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

4
.gitignore vendored
View File

@ -16,4 +16,6 @@ tests/**/coverage/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sln
pnpm-lock.yaml
yarn.lock

View File

@ -71,7 +71,7 @@
"@vue/compiler-sfc": "^3.2.20",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"@zougt/vite-plugin-theme-preprocessor": "^1.3.1",
"@zougt/vite-plugin-theme-preprocessor": "^1.3.2",
"autoprefixer": "^10.2.4",
"babel-plugin-transform-remove-console": "^6.9.4",
"chalk": "^2.4.2",

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 };
}

View File

@ -0,0 +1 @@
// 极光绿

View File

@ -3,6 +3,8 @@
*同时此scss变量文件作为默认主题变量文件被其他.scss通过 @import 必需 !default
*/
// 暗雅默认
// 菜单选中后字体样式
$subMenuActiveText: #f4f4f5 !default;
//菜单背景

View File

@ -0,0 +1,14 @@
// 薄暮
// 菜单选中后字体样式
$subMenuActiveText: #f4f4f5 !default;
//菜单背景
$menuBg: #1b2a47 !default;
// 鼠标覆盖菜单时的背景
$menuHover: #2a395b !default;
// 子菜单背景
$subMenuBg: #1f2d3d !default;
// 鼠标覆盖子菜单时的背景
$subMenuHover: #001528 !default;
$navTextColor: #fff !default;
$menuText: #7a80b4;

View File

@ -0,0 +1 @@
// 极客蓝

View File

@ -0,0 +1 @@
// 日暮

View File

@ -1,3 +1,4 @@
// 明亮
$subMenuActiveText: #409eff;
$menuBg: #fff;
$menuHover: #e0ebf6;

View File

@ -0,0 +1 @@
// 明青

View File

@ -0,0 +1 @@
// 酱紫

View File

@ -0,0 +1 @@
// 火山

View File

@ -60,12 +60,49 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
scss: {
multipleScopeVars: [
{
// 暗雅(默认)
scopeName: "layout-theme-default",
path: pathResolve("src/layout/theme/default-vars.scss")
},
{
// 明亮
scopeName: "layout-theme-light",
path: pathResolve("src/layout/theme/light-vars.scss")
},
{
// 薄暮
scopeName: "layout-theme-dusk",
path: pathResolve("src/layout/theme/dusk-vars.scss")
},
{
// 火山
scopeName: "layout-theme-volcano",
path: pathResolve("src/layout/theme/volcano-vars.scss")
},
{
// 日暮
scopeName: "layout-theme-higurashi",
path: pathResolve("src/layout/theme/higurashi-vars.scss")
},
{
// 明青
scopeName: "layout-theme-mingQing",
path: pathResolve("src/layout/theme/mingQing-vars.scss")
},
{
// 极光绿
scopeName: "layout-theme-auroraGreen",
path: pathResolve("src/layout/theme/auroraGreen-vars.scss")
},
{
// 极客蓝
scopeName: "layout-theme-geekBlue",
path: pathResolve("src/layout/theme/geekBlue-vars.scss")
},
{
// 酱紫
scopeName: "layout-theme-saucePurple",
path: pathResolve("src/layout/theme/saucePurple-vars.scss")
}
],
// 默认取 multipleScopeVars[0].scopeName

4828
yarn.lock

File diff suppressed because it is too large Load Diff