feat: 登录提示语根据语言设置&&主题颜色保存

Former-commit-id: d31b3c6adc4e620b4509e46119c43e64b53e48ad
This commit is contained in:
april
2023-09-26 18:24:04 +08:00
parent 4e8d9f744d
commit 07f189f585
6 changed files with 93 additions and 12 deletions

View File

@@ -14,7 +14,10 @@ export const useSettingsStore = defineStore("setting", () => {
);
const layout = useStorage<string>("layout", defaultSettings.layout);
const themeColor = useStorage<string>(
"themeColor",
defaultSettings.themeColor
);
// actions
function changeSetting(param: { key: string; value: any }) {
const { key, value } = param;
@@ -34,6 +37,9 @@ export const useSettingsStore = defineStore("setting", () => {
case "layout":
layout.value = value;
break;
case "themeColor":
themeColor.value = value;
break;
}
}
@@ -43,6 +49,7 @@ export const useSettingsStore = defineStore("setting", () => {
fixedHeader,
sidebarLogo,
layout,
themeColor,
changeSetting,
};
});