Skip to content

Commit

Permalink
修复修改设置无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hslr-s committed Dec 28, 2023
1 parent bb67aaf commit 092a74f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/components/apps/Style/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ watch(panelState.panelConfig, () => {
setTimeout(() => {
panelState.recordState()// 本地记录
isSaveing.value = false
uploadCloud()
}, 1000)
}
Expand Down
8 changes: 1 addition & 7 deletions src/store/modules/panel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
// },

},

Expand All @@ -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()
Expand Down

0 comments on commit 092a74f

Please sign in to comment.