Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
8e4a13e7
Commit
8e4a13e7
authored
Aug 12, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复加载更多出现重复数据的问题
parent
2541d425
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
index.tsx
...es/comment/query/detailed/components/RecordList/index.tsx
+11
-10
No files found.
src/pages/comment/query/detailed/components/RecordList/index.tsx
View file @
8e4a13e7
...
...
@@ -199,16 +199,17 @@ export default class RecordList extends React.Component<RecordListProps, RecordL
return
;
}
this
.
setState
((
prevState
:
any
)
=>
({
size
:
prevState
.
size
+
1
,
}));
this
.
getRecordList
().
then
(
res
=>
{
const
{
receivedList
,
page
,
size
}
=
this
.
state
;
this
.
setState
({
receivedList
:
{
...
receivedList
,
data
:
receivedList
.
data
.
concat
(
res
.
data
),
},
hasMore
:
checkMore
(
page
,
size
as
number
,
res
.
data
.
length
,
res
.
totalCount
),
page
:
prevState
.
page
+
1
,
}),
()
=>
{
this
.
getRecordList
().
then
(
res
=>
{
const
{
receivedList
,
page
,
size
}
=
this
.
state
;
this
.
setState
({
receivedList
:
{
...
receivedList
,
data
:
receivedList
.
data
.
concat
(
res
.
data
),
},
hasMore
:
checkMore
(
page
,
size
as
number
,
res
.
data
.
length
,
res
.
totalCount
),
});
});
});
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment