소스 검색

颜色联动

YaolongHan 4 년 전
부모
커밋
df6eb9edb3
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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)
     },
   },
 };