fix: setConfig

This commit is contained in:
Rewrite0
2024-03-08 11:10:16 +08:00
parent 6a0ffa4411
commit 4194a67117

View File

@@ -8,7 +8,7 @@ export const useConfigStore = defineStore('config', () => {
config.value = res;
}
const { execute: setConfig } = useApi(apiConfig.updateConfig, {
const { execute: set } = useApi(apiConfig.updateConfig, {
showMessage: true,
onSuccess() {
// 保存 config 后重启,以应用最新配置
@@ -17,6 +17,8 @@ export const useConfigStore = defineStore('config', () => {
},
});
const setConfig = () => set(config.value);
function getSettingGroup<Tkey extends keyof Config>(key: Tkey) {
return computed<Config[Tkey]>({
get() {