ZaiZai 1 year ago
parent
commit
39398add49
1 changed files with 23 additions and 2 deletions
  1. 23 2
      src/layout/modules/Theme.vue

+ 23 - 2
src/layout/modules/Theme.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="header-icon-bar" @click="toConfigClick">
+    <div class="header-icon-bar" @click="tapClick">
         <el-tooltip content="主题皮肤" placement="top">
             <hc-icon name="t-shirt" class="header-icon" />
         </el-tooltip>
@@ -7,8 +7,29 @@
 </template>
 
 <script setup>
-const toConfigClick = () => {
+import { onMounted, ref } from 'vue'
+import { useAppStore } from '~src/store'
+import { userConfigSave } from '~api/other'
 
+const store = useAppStore()
+
+//主题
+const theme = ref(store.getTheme)
+
+//渲染完成
+onMounted(() => {
+
+})
+
+//展开主题设置
+const tapClick = () => {
+
+}
+
+//主题改变
+const themeChange = (val) => {
+    store.setTheme(val)
+    userConfigSave({ theme: val })
 }
 </script>