Skip to content

Commit

Permalink
fix: redirect 属性不起作用
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed Jul 9, 2024
1 parent 63e2e20 commit 412221a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/layout/components/columns/ma-columns-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
window.open(bigMenu.path)
return
}
if (bigMenu.redirect) {
router.push(bigMenu.redirect)
return
}
if (bigMenu.children.length > 0) {
MaMenuRef.value.loadChildMenu(bigMenu)
showMenu.value = true
Expand Down
2 changes: 2 additions & 0 deletions src/layout/components/components/children-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
const routerPush = (menu) => {
if (menu.meta && menu.meta.type === 'L') {
window.open(menu.path)
} else if (menu.redirect) {
router.push(menu.redirect)
} else {
router.push(menu.path)
tagStore.addTag({ name: menu.name, title: menu.meta.title, path: menu.path })
Expand Down
2 changes: 2 additions & 0 deletions src/layout/components/components/sub-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
const routerPush = (menu) => {
if (menu.meta && menu.meta.type === 'L') {
window.open(menu.path)
} else if (menu.redirect) {
router.push(menu.redirect)
} else {
router.push(menu.path)
tagStore.addTag({ name: menu.name, title: menu.meta.title, path: menu.path })
Expand Down

0 comments on commit 412221a

Please sign in to comment.