From d07cc507ab8497a0e1a459de2b1314c8fd155cb0 Mon Sep 17 00:00:00 2001 From: zhangyh Date: Thu, 20 Nov 2025 14:00:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=86=E5=8F=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=A1=B9=E7=9B=AE=E6=97=B6=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AFcurrentProject=20=E4=B8=80=E5=B9=B6=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/tools/poseTransfer/index.vue | 2 +- src/views/HomeView/history.vue | 34 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/component/home/tools/poseTransfer/index.vue b/src/component/home/tools/poseTransfer/index.vue index 8f330f79..cb72711b 100644 --- a/src/component/home/tools/poseTransfer/index.vue +++ b/src/component/home/tools/poseTransfer/index.vue @@ -1524,7 +1524,7 @@ export default defineComponent({ } > .text { // display: inline-block; - font-size: 1.6rem; + font-size: 1.8rem; } } } diff --git a/src/views/HomeView/history.vue b/src/views/HomeView/history.vue index b8a601e3..71d26507 100644 --- a/src/views/HomeView/history.vue +++ b/src/views/HomeView/history.vue @@ -124,6 +124,10 @@ export default defineComponent({ let isShowMark: any = ref(false) const tableSearchBar: any = ref(null) + const currentProjectPath = computed(() => { + return store.state.Workspace.projectPath + }) + // 根据store中的语言设置返回对应的ant-design-vue语言包 const tableLocale = computed(() => { const language = store.state.UserHabit?.userDetail?.language @@ -227,7 +231,8 @@ export default defineComponent({ zhCN, tableLocale, projectSetting, - tableSearchBar + tableSearchBar, + currentProjectPath } }, data() { @@ -418,17 +423,22 @@ export default defineComponent({ message.success(this.t('HistoryPage.jsContent1')) this.collectionList.splice(index, 1) this.getHistoryList() - // let userGroupId: any = computed(() => { - // return - // }); - // if (record.id == this.store.state.HomeStoreModule.userGroupId) { - // this.store.commit('deleteUserGroupId') - // this.store.commit('setLikeDesignCollectionList', []) - // this.store.commit('clearAllData') - // this.store.commit('clearAllCollection') - // this.store.commit('setAllBoardDataChoose', {}) - // this.store.commit('clearShowSketchboard', {}) - // } + + // 对比 currentProjectPath 中携带的参数 id + const currentPath = this.currentProjectPath + if (currentPath) { + // 从路径中提取 id,路径格式为 /home/history/6784 + const pathMatch = currentPath.match(/\/history\/(\d+)/) + if (pathMatch && pathMatch[1]) { + const currentPathId = pathMatch[1] + // 对比删除的 id 和当前路径中的 id + if (String(id) === String(currentPathId)) { + // 如果匹配,执行清理操作 + this.store.commit('createProjectPath', '') + this.store.state.Workspace.cachedRoutes = [] + } + } + } }) } Modal.confirm({