Forráskód Böngészése

计划外列表页面刷新优化

zhujindu 11 hónapja
szülő
commit
1bc3b1d6ca
2 módosított fájl, 11 hozzáadás és 10 törlés
  1. 0 1
      src/mixin/scrollTop.js
  2. 11 9
      src/views/deviceOutside/index.vue

+ 0 - 1
src/mixin/scrollTop.js

@@ -3,7 +3,6 @@ export const scrollTopMixins = {
     const $content = document.querySelector('#content');
     $content.addEventListener('scroll', () => {
       this.$route.meta.scrollTop = $content.scrollTop;
-      console.log($content.scrollTop);
     });
   },
   activated() {

+ 11 - 9
src/views/deviceOutside/index.vue

@@ -631,13 +631,13 @@ export default {
     };
   },
   watch: {
-    deviceOutsidePage: {
-      handler(val) {
-        if (val) this.initData();
-        store.dispatch('setDeviceOutsidePage', false);
-      },
-      immediate: true,
-    },
+    // deviceOutsidePage: {
+    //   handler(val) {
+    //     if (val) this.initData();
+    //     store.dispatch('setDeviceOutsidePage', false);
+    //   },
+    //   immediate: true,
+    // },
     // $route(to, from) {
     //   this.storeName = localStorage.getItem('outvstoreName');
     //   this.chainName = localStorage.getItem('outvchainName');
@@ -648,13 +648,11 @@ export default {
     //     this.lat = '';
     //     this.lon = '';
     //   }
-
     //   if (localStorage.getItem('outvstoreLabelTypes') != null) {
     //     this.storeLabelTypes = localStorage.getItem('outvstoreLabelTypes').split(',');
     //   } else {
     //     this.storeLabelTypes = [];
     //   }
-
     //   if (localStorage.getItem('outvstoreCategoryList') != null) {
     //     this.result = localStorage.getItem('outvstoreCategoryList').split(',');
     //     this.storeLabelTypes = [];
@@ -754,6 +752,10 @@ export default {
     // }
     // this.getMonth();
   },
+  activated() {
+    if (this.deviceOutsidePage) this.initData();
+    store.dispatch('setDeviceOutsidePage', false);
+  },
   mounted() {
     // 上拉边界下拉出现白色空白
     let node = document.getElementsByClassName('deviceOutside')[0];