Skip to content

Commit

Permalink
fix(layout): [breadcrumb] incorrect navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 22, 2024
1 parent da63d23 commit 3ef2eeb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/layout/header/components/breadcrumb/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
// 点击菜单
const clickMenuItem = (menuItem: RouteRecordRaw) => {
if (!menuItem.redirect) return;
const { isExt, extOpenMode, type } = menuItem?.meta || {};
if (type === 0 && !menuItem.redirect) return;
const { isExt, extOpenMode } = menuItem?.meta || {};
if (isExt && extOpenMode === 1) {
window.open(menuItem.path);
} else {
router.push({ name: menuItem.name });
const to = typeof menuItem.redirect === 'string' ? menuItem.redirect : menuItem;
router.push(to);
}
};
Expand Down

0 comments on commit 3ef2eeb

Please sign in to comment.