Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
7a090bda
Commit
7a090bda
authored
Mar 10, 2023
by
Giovanni
Browse files
关闭当前tab页应跳转最右侧tab页而非首页
parent
641e550d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/plugins/tab.js
View file @
7a090bda
...
...
@@ -32,8 +32,12 @@ export default {
// 关闭指定tab页签
closePage
(
obj
)
{
if
(
obj
===
undefined
)
{
return
store
.
dispatch
(
'
tagsView/delView
'
,
router
.
currentRoute
).
then
(({
lastPath
})
=>
{
return
router
.
push
(
lastPath
||
'
/
'
);
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
'
,
obj
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment