From c3bb35b20d6e076f73a1cad50fd6b9b94ca399a7 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期一, 06 一月 2025 16:15:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/plugins/tab.js | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/tab.js b/src/plugins/tab.js index b029c0e..a287983 100644 --- a/src/plugins/tab.js +++ b/src/plugins/tab.js @@ -31,13 +31,10 @@ }, // 关闭指定tab页签 closePage(obj) { + let indexPage = store.state.permission.indexPage; if (obj === undefined) { - return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => { - const latestView = visitedViews.slice(-1)[0] - if (latestView) { - return router.push(latestView.fullPath) - } - return router.push('/'); + return store.dispatch('tagsView/delView', router.currentRoute).then(({ lastPath }) => { + return router.push(lastPath || indexPage); }); } return store.dispatch('tagsView/delView', obj); -- Gitblit v1.9.2