diff --git a/webui/src/store/config.ts b/webui/src/store/config.ts index 2a0ca730..9af3716e 100644 --- a/webui/src/store/config.ts +++ b/webui/src/store/config.ts @@ -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(key: Tkey) { return computed({ get() {