feat: 系统设置添加主题动态切换
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {computed, ref, watch} from "vue";
|
||||
import {computed, onMounted, ref, watch} from "vue";
|
||||
import {useAppStoreHook} from "@/store/modules/app";
|
||||
import {ElConfigProvider} from 'element-plus'
|
||||
|
||||
@@ -29,5 +29,9 @@ watch(language, (value) => {
|
||||
// 初始化立即执行,
|
||||
immediate: true
|
||||
})
|
||||
onMounted(()=>{
|
||||
const style = localStorage.getItem("style");
|
||||
document.documentElement.style.cssText = style as string;
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user