From cb80de3742d66cfee20bc3136c735e5ca5a7d45c Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 29 十一月 2023 12:44:42 +0800
Subject: [PATCH] 优化字典标签支持自定义分隔符
---
src/plugins/tab.js | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/plugins/tab.js b/src/plugins/tab.js
index cc332b5..004aa86 100644
--- a/src/plugins/tab.js
+++ b/src/plugins/tab.js
@@ -1,4 +1,4 @@
-import useTagsViewStore from '@/store/modules/tagsview'
+import useTagsViewStore from '@/store/modules/tagsView'
import router from '@/router'
export default {
@@ -32,8 +32,12 @@
// 鍏抽棴鎸囧畾tab椤电
closePage(obj) {
if (obj === undefined) {
- return useTagsViewStore().delView(router.currentRoute.value).then(({ lastPath }) => {
- return router.push(lastPath || '/index');
+ return useTagsViewStore().delView(router.currentRoute.value).then(({ visitedViews }) => {
+ const latestView = visitedViews.slice(-1)[0]
+ if (latestView) {
+ return router.push(latestView.fullPath)
+ }
+ return router.push('/');
});
}
return useTagsViewStore().delView(obj);
--
Gitblit v1.9.3