From 4194a67117f962b5c51bc31619f68ab86fee0082 Mon Sep 17 00:00:00 2001 From: Rewrite0 Date: Fri, 8 Mar 2024 11:10:16 +0800 Subject: [PATCH] fix: setConfig --- webui/src/store/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() {