File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 70
70
isLoading: false ,
71
71
isComplete: false ,
72
72
isFirstLoad: true , // save the current loading whether it is the first loading
73
+ isActivated: true , // save activate status to support keep-alive feature
73
74
};
74
75
},
75
76
computed: {
93
94
this .scrollParent = getScrollParent (this .$el );
94
95
95
96
this .scrollHandler = function scrollHandlerOriginal () {
96
- if (! this .isLoading ) {
97
+ if (! this .isLoading && this . isActivated ) {
97
98
this .attemptLoad ();
98
99
}
99
100
}.bind (this );
103
104
104
105
this .$on (' $InfiniteLoading:loaded' , () => {
105
106
this .isFirstLoad = false ;
106
- if (this .isLoading ) {
107
+ if (this .isLoading && this . isActivated ) {
107
108
this .$nextTick (this .attemptLoad );
108
109
}
109
110
});
121
122
});
122
123
},
123
124
/**
124
- * To adapt to keep-alive feature, but only work on Vue 2.2.0 and above, see: http ://vuejs.org/v2/api/#keep-alive
125
+ * To adapt to keep-alive feature, but only work on Vue 2.2.0 and above, see: https ://vuejs.org/v2/api/#keep-alive
125
126
*/
126
127
deactivated () {
127
- this .isLoading = false ;
128
+ this .isActivated = false ;
129
+ },
130
+ activated () {
131
+ this .isActivated = true ;
128
132
},
129
133
methods: {
130
134
attemptLoad () {
You can’t perform that action at this time.
0 commit comments