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 2222 v-on:toupper =" onScrollToUpper"
2323 v-on:tolower =" onScrollToLower"
2424 >
25- <div slot =" footer" :style = " { visibilty: visibility } " class =" loader" ></div >
25+ <div slot =" footer" class =" loader" ></div >
2626 </virtual-list >
2727 </div >
2828
@@ -62,18 +62,15 @@ export default {
6262 codeblock: Code
6363 },
6464
65+ created () {
66+ this .isLoading = false
67+ },
68+
6569 data () {
6670 return {
6771 items: getPageData (pageSize, 0 ),
6872 itemComponent: Item,
6973 isShowView: DEFAULT_TAB === TAB_TYPE .VIEW ,
70- showLoading: false
71- }
72- },
73-
74- computed: {
75- visibility () {
76- return this .showLoading ? ' ' : ' hidden'
7774 }
7875 },
7976
@@ -89,16 +86,16 @@ export default {
8986 onScrollToLower () {
9087 console .log (' at bottom' )
9188
92- if (this .showLoading ) {
89+ if (this .isLoading ) {
9390 return
9491 }
9592
96- this .showLoading = true
93+ this .isLoading = true
9794
9895 setTimeout (() => {
99- this .showLoading = false
96+ this .isLoading = false
10097 this .items = this .items .concat (getPageData (pageSize, this .items .length ))
101- }, 800 );
98+ }, 500 );
10299 }
103100 }
104101}
You can’t perform that action at this time.
0 commit comments