YaolongHan 4 lat temu
rodzic
commit
df6eb9edb3
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      src/components/menuList.vue

+ 6 - 0
src/components/menuList.vue

@@ -287,6 +287,12 @@ export default {
       this.showStyle = !this.showStyle;
       //   改变颜色风格
       bus.$emit("changeStyleColor", this.showStyle);
+
+       /**
+       * 皮肤模式切换后,存储用户名,皮肤模式
+       */
+      const newV = this.showStyle ? 'dark':'light';
+      localStorage.setItem(`${this.userInfo.username}__skinMode`, newV)
     },
   },
 };