提交
This commit is contained in:
1 parent
246ad2228e
commit
8e2dd8b9f0
186 files changed
+38821
-2571
No files matched your search
@@ -17,6 +17,7 @@
|
||||
import { AppRouteRecord } from '@/types/router'
|
||||
import { router } from '@/router'
|
||||
import { isNavigableMenuItem } from './route'
|
||||
import { useSettingStore } from '@/store/modules/setting'
|
||||
|
||||
// 打开外部链接
|
||||
export const openExternalLink = (link: string) => {
|
||||
@@ -38,6 +39,10 @@ export const handleMenuJump = (item: AppRouteRecord, jumpToFirst: boolean = fals
|
||||
|
||||
// 如果不需要跳转到第一个子菜单,或者没有子菜单,直接跳转当前路径
|
||||
if (!jumpToFirst || !item.children?.length) {
|
||||
// 已经在当前页面时,刷新页面内容以重新加载列表数据
|
||||
if (router.currentRoute.value.path === item.path) {
|
||||
return useSettingStore().reload()
|
||||
}
|
||||
return router.push(item.path)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user