feat: 新增系统样式配置,支持改logo图标与标题

This commit is contained in:
meilin.huang
2024-01-05 12:09:12 +08:00
parent ae3d2659aa
commit 7a7a7020b4
18 changed files with 385 additions and 458 deletions

View File

@@ -22,12 +22,9 @@ import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue';
import { useRoute } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '@/store/themeConfig';
import { getLocal } from '@/common/utils/storage';
import LockScreen from '@/layout/lockScreen/index.vue';
import Setings from '@/layout/navBars/breadcrumb/setings.vue';
import mittBus from '@/common/utils/mitt';
import { getThemeConfig } from './common/utils/storage';
import { useWatermark } from '@/common/sysconfig';
import { useIntervalFn } from '@vueuse/core';
const setingsRef = ref();
@@ -49,17 +46,8 @@ onMounted(() => {
openSetingsDrawer();
});
// 获取缓存中的布局配置
const tc = getThemeConfig();
if (tc) {
themeConfigStores.setThemeConfig({ themeConfig: tc });
document.documentElement.style.cssText = getLocal('themeConfigStyle');
}
// 是否开启水印
useWatermark().then((res) => {
themeConfigStores.setWatermarkConfig(res);
});
// 初始化系统主题
themeConfigStores.initThemeConfig();
});
});