修复修改设置无效的问题
This commit is contained in:
parent
bb67aaf5a6
commit
092a74f834
@ -40,6 +40,7 @@ watch(panelState.panelConfig, () => {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
panelState.recordState()// 本地记录
|
panelState.recordState()// 本地记录
|
||||||
|
isSaveing.value = false
|
||||||
uploadCloud()
|
uploadCloud()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,6 @@ export const usePanelState = defineStore('panel', {
|
|||||||
state: (): Panel.State => getLocalState() || defaultState(),
|
state: (): Panel.State => getLocalState() || defaultState(),
|
||||||
|
|
||||||
getters: {
|
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() {
|
updatePanelConfigByCloud() {
|
||||||
getUserConfig<Panel.userConfig>().then((res) => {
|
getUserConfig<Panel.userConfig>().then((res) => {
|
||||||
if (res.code === 0)
|
if (res.code === 0)
|
||||||
this.panelConfig = res.data.panel
|
this.panelConfig = { ...defaultStatePanelConfig(), ...res.data.panel }
|
||||||
else
|
else
|
||||||
this.resetPanelConfig() // 重置恢复默认
|
this.resetPanelConfig() // 重置恢复默认
|
||||||
this.recordState()
|
this.recordState()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user