|
@@ -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>
|
|
|
|