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 7070 isLoading: false ,
7171 isComplete: false ,
7272 isFirstLoad: true , // save the current loading whether it is the first loading
73+ isActivated: true , // save activate status to support keep-alive feature
7374 };
7475 },
7576 computed: {
9394 this .scrollParent = getScrollParent (this .$el );
9495
9596 this .scrollHandler = function scrollHandlerOriginal () {
96- if (! this .isLoading ) {
97+ if (! this .isLoading && this . isActivated ) {
9798 this .attemptLoad ();
9899 }
99100 }.bind (this );
103104
104105 this .$on (' $InfiniteLoading:loaded' , () => {
105106 this .isFirstLoad = false ;
106- if (this .isLoading ) {
107+ if (this .isLoading && this . isActivated ) {
107108 this .$nextTick (this .attemptLoad );
108109 }
109110 });
121122 });
122123 },
123124 /**
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
125126 */
126127 deactivated () {
127- this .isLoading = false ;
128+ this .isActivated = false ;
129+ },
130+ activated () {
131+ this .isActivated = true ;
128132 },
129133 methods: {
130134 attemptLoad () {
You can’t perform that action at this time.
0 commit comments