fix: update

This commit is contained in:
xiaoxian521
2021-10-28 23:38:54 +08:00
parent b248d9ea31
commit af6a1b03cd
14 changed files with 69 additions and 4833 deletions

View File

@@ -16,7 +16,7 @@ import { debounce } from "/@/utils/debounce";
import { themeColorsType } from "../../types";
import { useAppStoreHook } from "/@/store/modules/app";
import { storageLocal, storageSession } from "/@/utils/storage";
import { addClassNameToHtmlTag } from "@zougt/vite-plugin-theme-preprocessor/dist/browser-utils";
import { toggleTheme } from "@zougt/vite-plugin-theme-preprocessor/dist/browser-utils";
const router = useRouter();
const { isSelect } = useCssModule();
@@ -198,8 +198,10 @@ function setLayoutModel(layout: string) {
// 设置导航主题色
function setLayoutThemeColor(theme: string) {
layoutTheme.value.theme = theme;
addClassNameToHtmlTag({
scopeName: `layout-theme-${theme}`
toggleTheme({
scopeName: `layout-theme-${theme}`,
hasRemoveScopeName: false,
themeLinkTagInjectTo: "head"
});
instance.layout = { layout: useAppStoreHook().layout, theme };
}