|
@@ -1,6 +1,7 @@
|
|
|
import { localStorageUtil } from '@/utils/storage';
|
|
import { localStorageUtil } from '@/utils/storage';
|
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
|
import { initData } from "../methods";
|
|
import { initData } from "../methods";
|
|
|
|
|
+import { isOemByEnum, OemType } from './projectName';
|
|
|
|
|
|
|
|
// 主题色枚举
|
|
// 主题色枚举
|
|
|
export enum ThemeEnum {
|
|
export enum ThemeEnum {
|
|
@@ -32,15 +33,15 @@ export function setTheme(value: ThemeEnum) {
|
|
|
*/
|
|
*/
|
|
|
export function initTheme() {
|
|
export function initTheme() {
|
|
|
initData(() => {
|
|
initData(() => {
|
|
|
- const theme = localStorageUtil.getItem('theme')
|
|
|
|
|
- if (theme) {
|
|
|
|
|
- changeTheme(theme)
|
|
|
|
|
|
|
+ if (isOemByEnum(OemType.wrspot)) { // 云融 项目 主题缓存
|
|
|
|
|
+ const theme = localStorageUtil.getItem('theme')
|
|
|
|
|
+ if (theme) {
|
|
|
|
|
+ changeTheme(theme)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ changeTheme(ThemeEnum.dark)
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
- // if (isOemByEnum(OemType.wrspot)) {
|
|
|
|
|
- // changeTheme(ThemeEnum.light)
|
|
|
|
|
- // } else {
|
|
|
|
|
- // changeTheme(ThemeEnum.dark)
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ localStorageUtil.removeItem('theme')
|
|
|
changeTheme(ThemeEnum.dark)
|
|
changeTheme(ThemeEnum.dark)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|