修复修改设置无效的问题

This commit is contained in:
Sun 2023-12-28 21:31:56 +08:00
parent bb67aaf5a6
commit 092a74f834
2 changed files with 2 additions and 7 deletions

View File

@ -40,6 +40,7 @@ watch(panelState.panelConfig, () => {
setTimeout(() => {
panelState.recordState()//
isSaveing.value = false
uploadCloud()
}, 1000)
}

View File

@ -7,12 +7,6 @@ export const usePanelState = defineStore('panel', {
state: (): Panel.State => getLocalState() || defaultState(),
getters: {
// getChatHistoryByCurrentActive(state: AiApplet.State) {
// const index = state.history.findIndex(item => item.id === state.active)
// if (index !== -1)
// return state.history[index]
// return null
// },
},
@ -36,7 +30,7 @@ export const usePanelState = defineStore('panel', {
updatePanelConfigByCloud() {
getUserConfig<Panel.userConfig>().then((res) => {
if (res.code === 0)
this.panelConfig = res.data.panel
this.panelConfig = { ...defaultStatePanelConfig(), ...res.data.panel }
else
this.resetPanelConfig() // 重置恢复默认
this.recordState()