From ff14fa5e4efaf4e3e6a307473e9bd2881da265c1 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期五, 18 四月 2025 12:55:34 +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