修复修改设置无效的问题
This commit is contained in:
parent
bb67aaf5a6
commit
092a74f834
@ -40,6 +40,7 @@ watch(panelState.panelConfig, () => {
|
||||
|
||||
setTimeout(() => {
|
||||
panelState.recordState()// 本地记录
|
||||
isSaveing.value = false
|
||||
uploadCloud()
|
||||
}, 1000)
|
||||
}
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user