zhongxiaoyu 3 år sedan
förälder
incheckning
711f5e9a77
1 ändrade filer med 12 tillägg och 7 borttagningar
  1. 12 7
      src/App.vue

+ 12 - 7
src/App.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-14 17:17:53
- * @LastEditTime: 2022-03-02 10:48:32
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-03-28 17:08:38
+ * @LastEditors: your name
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\App.vue
 -->
@@ -102,11 +102,14 @@ export default {
       },
       deep: true,
     },
-  },
-  created () {
-    if (this.systemSet) {
-      const { LoginError } = typeof this.systemSet === "string" ? JSON.parse(this.systemSet) : this.systemSet;
-      this.LoginError = LoginError;
+    systemSet: {
+      handler (val) {
+        if (val) {
+          const { LoginError } = typeof this.systemSet === "string" ? JSON.parse(this.systemSet) : this.systemSet;
+          this.LoginError = LoginError;
+        }
+      },
+      deep: true,
     }
   },
   mounted () {
@@ -272,6 +275,7 @@ export default {
               this.$store.dispatch("app/getErrorNum", 0);
               this.clearAll();
               this.$store.dispatch("app/toggleDialog", false);
+              this.$store.dispatch('tagsView/delAllViews');
               this.$router.push(`/login?redirect=${this.$route.fullPath}`);
               location.reload();
             }
@@ -280,6 +284,7 @@ export default {
             this.$store.dispatch("app/getErrorNum", 0);
             this.clearAll();
             this.$store.dispatch("app/toggleDialog", false);
+            this.$store.dispatch('tagsView/delAllViews');
             this.$router.push(`/login?redirect=${this.$route.fullPath}`);
             location.reload();
           }