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 20
20
:data-component =" itemComponent"
21
21
22
22
v-on:toupper =" onScrollToUpper"
23
- :upper-threshold =" 50"
24
23
v-on:tolower =" onScrollToLower"
25
- :lower-threshold =" 50"
26
24
>
27
- <div slot =" footer" v-show = " showLoading " class =" loader" ></div >
25
+ <div slot =" footer" :style = " { visibilty: visibility } " class =" loader" ></div >
28
26
</virtual-list >
29
27
</div >
30
28
@@ -73,16 +71,24 @@ export default {
73
71
}
74
72
},
75
73
74
+ computed: {
75
+ visibility () {
76
+ return this .showLoading ? ' ' : ' hidden'
77
+ }
78
+ },
79
+
76
80
methods: {
77
81
onTabChange (type ) {
78
82
this .isShowView = type === TAB_TYPE .VIEW
79
83
},
80
84
81
85
onScrollToUpper () {
82
- console .log (' to upper ' )
86
+ console .log (' at top ' )
83
87
},
84
88
85
89
onScrollToLower () {
90
+ console .log (' at bottom' )
91
+
86
92
if (this .showLoading ) {
87
93
return
88
94
}
You can’t perform that action at this time.
0 commit comments