From f542d731de01e6897243b2072523ecdaa6c63505 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 01 三月 2024 08:50:02 +0800
Subject: [PATCH] 修改

---
 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