From a2aa94ae99095ec3fb5c463eefca33f89fd25bca Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 05 Mar 2024 08:52:17 +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