shaogen1995 4 роки тому
батько
коміт
4dec804840
1 змінених файлів з 5 додано та 3 видалено
  1. 5 3
      src/views/layout/index.vue

+ 5 - 3
src/views/layout/index.vue

@@ -220,9 +220,11 @@ export default {
       this.$router.push(item.push + ind).catch(() => {})
       this.$router.push(item.push + ind).catch(() => {})
       this.isShow = 0
       this.isShow = 0
       // 如果从别的tab栏点击藏品总账,就自动刷新页面获取最新信息  location.reload(true)
       // 如果从别的tab栏点击藏品总账,就自动刷新页面获取最新信息  location.reload(true)
-      setTimeout(() => {
-        if (name === '藏品总账' || name === '征集品总账') location.reload(true)
-      }, 100)
+      this.$nextTick(() => {
+        setTimeout(() => {
+          if (name === '藏品总账' || name === '征集品总账') location.reload(true)
+        }, 100)
+      })
     },
     },
     toHome (index) {
     toHome (index) {
       if (index === 0) this.$router.push('/layout/home')
       if (index === 0) this.$router.push('/layout/home')