File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
example/src/views/infinite-loading Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 22
22
v-on:toupper =" onScrollToUpper"
23
23
v-on:tolower =" onScrollToLower"
24
24
>
25
- <div slot =" footer" :style = " { visibilty: visibility } " class =" loader" ></div >
25
+ <div slot =" footer" class =" loader" ></div >
26
26
</virtual-list >
27
27
</div >
28
28
@@ -62,18 +62,15 @@ export default {
62
62
codeblock: Code
63
63
},
64
64
65
+ created () {
66
+ this .isLoading = false
67
+ },
68
+
65
69
data () {
66
70
return {
67
71
items: getPageData (pageSize, 0 ),
68
72
itemComponent: Item,
69
73
isShowView: DEFAULT_TAB === TAB_TYPE .VIEW ,
70
- showLoading: false
71
- }
72
- },
73
-
74
- computed: {
75
- visibility () {
76
- return this .showLoading ? ' ' : ' hidden'
77
74
}
78
75
},
79
76
@@ -89,16 +86,16 @@ export default {
89
86
onScrollToLower () {
90
87
console .log (' at bottom' )
91
88
92
- if (this .showLoading ) {
89
+ if (this .isLoading ) {
93
90
return
94
91
}
95
92
96
- this .showLoading = true
93
+ this .isLoading = true
97
94
98
95
setTimeout (() => {
99
- this .showLoading = false
96
+ this .isLoading = false
100
97
this .items = this .items .concat (getPageData (pageSize, this .items .length ))
101
- }, 800 );
98
+ }, 500 );
102
99
}
103
100
}
104
101
}
You can’t perform that action at this time.
0 commit comments