微调颜色

This commit is contained in:
sjl
2025-03-17 15:55:30 +08:00
parent 630eb48d28
commit 5f68071c77
25 changed files with 46 additions and 40 deletions

View File

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