File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
example/src/views/infinite-loading Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 2020 :data-component =" itemComponent"
2121
2222 v-on:toupper =" onScrollToUpper"
23- :upper-threshold =" 50"
2423 v-on:tolower =" onScrollToLower"
25- :lower-threshold =" 50"
2624 >
27- <div slot =" footer" v-show = " showLoading " class =" loader" ></div >
25+ <div slot =" footer" :style = " { visibilty: visibility } " class =" loader" ></div >
2826 </virtual-list >
2927 </div >
3028
@@ -73,16 +71,24 @@ export default {
7371 }
7472 },
7573
74+ computed: {
75+ visibility () {
76+ return this .showLoading ? ' ' : ' hidden'
77+ }
78+ },
79+
7680 methods: {
7781 onTabChange (type ) {
7882 this .isShowView = type === TAB_TYPE .VIEW
7983 },
8084
8185 onScrollToUpper () {
82- console .log (' to upper ' )
86+ console .log (' at top ' )
8387 },
8488
8589 onScrollToLower () {
90+ console .log (' at bottom' )
91+
8692 if (this .showLoading ) {
8793 return
8894 }
You can’t perform that action at this time.
0 commit comments