From 7eb695029d3a4dae137d5aa12de518031c19f1da Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Wed, 22 May 2024 14:54:37 +0800 Subject: [PATCH] fix --- src/component/Detail/habit.vue | 8 ++++---- src/store/workspace/workspace.ts | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/component/Detail/habit.vue b/src/component/Detail/habit.vue index 23da2c60..51e03c77 100644 --- a/src/component/Detail/habit.vue +++ b/src/component/Detail/habit.vue @@ -251,9 +251,8 @@ export default defineComponent({ } let data = this.workspaceItem delete data.isLastIndex - this.putWorkspace(data,'') + this.putWorkspace(data,this.workspaceItem.id) this.openType.model = false - this.getDetail(this.workspaceItem.id) // this.getDetail(this.workspaceItem.id) this.store.commit("setWorkspace", this.workspaceItem); }else{ @@ -531,16 +530,17 @@ export default defineComponent({ // this.getDetail(index) }else{ } - this.getworkspace() if(index){ this.getDetail(index) + }else{ + this.getworkspace() } this.workspace.workspaceList[index].workSpaceName = this.workspaceItemName this.workspace.workspaceList[index].putName = false this.openType.addWorkspace = false } }).catch((res)=>{ - this.getworkspace() + // this.getworkspace() }); }, deleteWorkspace(data:any){ diff --git a/src/store/workspace/workspace.ts b/src/store/workspace/workspace.ts index 2dfff126..b019133c 100644 --- a/src/store/workspace/workspace.ts +++ b/src/store/workspace/workspace.ts @@ -16,6 +16,8 @@ const Workspace : Module = { }, mutations:{ setWorkspace(state,files){ + console.log(files); + state.workspace = files }, setWorkspaceSex(state,files){