Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
54e52773
Commit
54e52773
authored
Oct 14, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proof列表是否加载完毕判断
parent
842be96b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Index.vue
src/views/proof/Index.vue
+6
-5
No files found.
src/views/proof/Index.vue
View file @
54e52773
...
...
@@ -59,6 +59,7 @@ import SelectTemplate from '@/views/template/components/SelectTemplate.vue';
import
PreviewTemplate
from
'@/views/template/components/PreviewTemplate.vue'
;
import
AddFolder
from
'@/views/template/components/AddFolder.vue'
;
import
AddBaseinfo
from
'./components/AddBaseinfo.vue'
;
import
proof
from
'@/api/modules/proof'
;
@
Component
({
components
:
{
[
Picker
.
name
]:
Picker
,
...
...
@@ -87,7 +88,6 @@ export default class Index extends Mixins(MixinProof) {
private
currentProof
:
any
=
{};
private
list
:
any
[]
=
[];
private
total
:
number
=
0
;
private
page
:
number
=
1
;
private
loading
:
boolean
=
false
;
...
...
@@ -109,7 +109,6 @@ export default class Index extends Mixins(MixinProof) {
return
ChainStatus
;
}
protected
resetList
()
{
this
.
total
=
0
;
this
.
list
=
[];
this
.
finished
=
false
;
this
.
page
=
1
;
...
...
@@ -171,17 +170,19 @@ export default class Index extends Mixins(MixinProof) {
}
private
async
getList
()
{
const
{
chainStatus
}
=
this
;
const
pageSize
=
20
;
const
params
=
{
status
:
Array
.
isArray
(
chainStatus
)
?
chainStatus
:
[
chainStatus
],
pageSize
,
};
const
res
=
await
this
.
$api
.
proof
.
list
(
this
.
page
++
,
params
);
this
.
total
=
res
.
total
;
this
.
list
=
[...
this
.
list
,
...
(
res
.
results
||
[])
];
const
currentProofList
=
res
.
results
||
[]
;
this
.
list
=
[...
this
.
list
,
...
currentProofList
];
// 加载状态结束
this
.
loading
=
false
;
// 数据全部加载完成
if
(
this
.
list
.
length
>=
this
.
total
)
{
if
(
currentProofList
<
pageSize
)
{
this
.
finished
=
true
;
}
}
...
...
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