mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-04 07:27:41 +08:00
fix: update
This commit is contained in:
parent
b248d9ea31
commit
af6a1b03cd
4
.gitignore
vendored
4
.gitignore
vendored
@ -16,4 +16,6 @@ tests/**/coverage/
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sln
|
||||
pnpm-lock.yaml
|
||||
yarn.lock
|
||||
|
@ -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",
|
||||
|
@ -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 };
|
||||
}
|
||||
|
1
src/layout/theme/auroraGreen-vars.scss
Normal file
1
src/layout/theme/auroraGreen-vars.scss
Normal file
@ -0,0 +1 @@
|
||||
// 极光绿
|
@ -3,6 +3,8 @@
|
||||
*同时此scss变量文件作为默认主题变量文件,被其他.scss通过 @import 时,必需 !default
|
||||
*/
|
||||
|
||||
// 暗雅(默认)
|
||||
|
||||
// 菜单选中后字体样式
|
||||
$subMenuActiveText: #f4f4f5 !default;
|
||||
//菜单背景
|
||||
|
14
src/layout/theme/dusk-vars.scss
Normal file
14
src/layout/theme/dusk-vars.scss
Normal 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;
|
1
src/layout/theme/geekBlue-vars.scss
Normal file
1
src/layout/theme/geekBlue-vars.scss
Normal file
@ -0,0 +1 @@
|
||||
// 极客蓝
|
1
src/layout/theme/higurashi-vars.scss
Normal file
1
src/layout/theme/higurashi-vars.scss
Normal file
@ -0,0 +1 @@
|
||||
// 日暮
|
@ -1,3 +1,4 @@
|
||||
// 明亮
|
||||
$subMenuActiveText: #409eff;
|
||||
$menuBg: #fff;
|
||||
$menuHover: #e0ebf6;
|
||||
|
1
src/layout/theme/mingQing-vars.scss
Normal file
1
src/layout/theme/mingQing-vars.scss
Normal file
@ -0,0 +1 @@
|
||||
// 明青
|
1
src/layout/theme/saucePurple-vars.scss
Normal file
1
src/layout/theme/saucePurple-vars.scss
Normal file
@ -0,0 +1 @@
|
||||
// 酱紫
|
1
src/layout/theme/volcano-vars.scss
Normal file
1
src/layout/theme/volcano-vars.scss
Normal file
@ -0,0 +1 @@
|
||||
// 火山
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user