'admin-20.12.18:处理完成灰色模式、自定义全局主题'
This commit is contained in:
parent
e41c8816e6
commit
0695d01040
@ -56,14 +56,14 @@ export default {
|
||||
});
|
||||
function colorChange() {
|
||||
document.documentElement.style.setProperty(
|
||||
"--primary-color",
|
||||
"--color-primary",
|
||||
state.color
|
||||
);
|
||||
}
|
||||
function onSwitchChange1() {
|
||||
document.documentElement.style.setProperty(
|
||||
"--color-grayscale",
|
||||
state.value1 ? 1 : 0
|
||||
document.body.setAttribute(
|
||||
"style",
|
||||
`filter:grayscale(${state.value1 ? 1 : 0})`
|
||||
);
|
||||
}
|
||||
return {
|
||||
|
@ -1,11 +1,11 @@
|
||||
@import 'common/transition.scss';
|
||||
@import 'common/var.scss';
|
||||
|
||||
// .el-button--primary {
|
||||
// color: #ffffff;
|
||||
// background-color: var(--primary-color);
|
||||
// border-color: var(--primary-color);
|
||||
// }
|
||||
.el-button--primary {
|
||||
color: #ffffff;
|
||||
background-color: setColor(primary);
|
||||
border-color: setColor(primary);
|
||||
}
|
||||
|
||||
// .el-button--primary:hover {
|
||||
// color: #ffffff;
|
||||
@ -13,21 +13,21 @@
|
||||
// border-color: var(--primary--color-hover);
|
||||
// }
|
||||
|
||||
// .el-switch.is-checked .el-switch__core {
|
||||
// border-color: var(--primary-color) !important;
|
||||
// background-color: var(--primary-color) !important;
|
||||
// }
|
||||
.el-switch.is-checked .el-switch__core {
|
||||
border-color: setColor(primary) !important;
|
||||
background-color: setColor(primary) !important;
|
||||
}
|
||||
|
||||
// .el-tabs__item:hover,
|
||||
// .el-tabs__item.is-active {
|
||||
// color: var(--primary-color) !important;
|
||||
// }
|
||||
// .el-tabs__active-bar {
|
||||
// background-color: var(--primary-color) !important;
|
||||
// }
|
||||
.el-tabs__item:hover,
|
||||
.el-tabs__item.is-active {
|
||||
color: setColor(primary) !important;
|
||||
}
|
||||
.el-tabs__active-bar {
|
||||
background-color: setColor(primary) !important;
|
||||
}
|
||||
|
||||
// .el-menu-item.is-active,
|
||||
// .el-submenu.is-active .el-submenu__title {
|
||||
// color: var(--primary-color) !important;
|
||||
// border-bottom-color: var(--primary-color) !important;
|
||||
// }
|
||||
.el-menu-item.is-active,
|
||||
.el-submenu.is-active .el-submenu__title {
|
||||
color: setColor(primary) !important;
|
||||
border-bottom-color: setColor(primary) !important;
|
||||
}
|
||||
|
@ -8,10 +8,6 @@ $root: (
|
||||
info: #909399,
|
||||
);
|
||||
|
||||
:root {
|
||||
--grayscales: 0;
|
||||
}
|
||||
|
||||
/* 循环赋值给:root
|
||||
------------------------------- */
|
||||
:root {
|
||||
@ -65,5 +61,4 @@ body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid red;
|
||||
filter: grayscale(red);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user