微调颜色
This commit is contained in:
@@ -27,6 +27,7 @@ export const useTheme = () => {
|
||||
|
||||
// 修改主题颜色
|
||||
const changePrimary = (val: string | null) => {
|
||||
|
||||
if (!val) {
|
||||
val = DEFAULT_PRIMARY;
|
||||
ElMessage({ type: "success", message: `主题颜色已重置为 ${DEFAULT_PRIMARY}` });
|
||||
@@ -42,8 +43,7 @@ export const useTheme = () => {
|
||||
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, primaryColor);
|
||||
}
|
||||
globalStore.setGlobalState("primary", val);
|
||||
};
|
||||
|
||||
}
|
||||
// 灰色和弱色切换
|
||||
const changeGreyOrWeak = (type: Theme.GreyOrWeakType, value: boolean) => {
|
||||
const body = document.body as HTMLElement;
|
||||
|
||||
Reference in New Issue
Block a user