File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,15 @@ declare module 'vue-router' {
6666
6767function extendClose ( router : Router ) {
6868 router . close = function ( to : RouteLocationRaw ) {
69- const settingsStore = useSettingsStore ( pinia )
70- if ( settingsStore . settings . tabbar . enable ) {
71- const tabId = getId ( router )
72- const tabbarStore = useTabbarStore ( pinia )
73- tabbarStore . remove ( tabId )
74- }
75- return router . push ( to )
69+ const currentRoute = router . currentRoute . value
70+ const tabId = getId ( router )
71+ return router . push ( to ) . then ( ( ) => {
72+ const settingsStore = useSettingsStore ( pinia )
73+ if ( settingsStore . settings . tabbar . enable && currentRoute . meta . tabMerge !== 'activeMenu' ) {
74+ const tabbarStore = useTabbarStore ( pinia )
75+ tabbarStore . remove ( tabId )
76+ }
77+ } )
7678 }
7779}
7880
You can’t perform that action at this time.
0 commit comments