Skip to content

Bug: 布局为"双列菜单"或者"水平"模式下, 一级菜单高亮问题 #5864

@wyc001122

Description

@wyc001122

Version

Vben Admin V5

Describe the bug?

点击一级菜单时,如果是以新窗口打开,期望原窗口的菜单状态不变(不应切换选中的菜单项)

Reproduction

  1. fork项目
  2. 修改 vue-vben-admin\playground\src\router\routes\modules\vben.ts
const routes: RouteRecordRaw[] = [
  // ...
  {
    component: () => import('#/views/_core/about/index.vue'),
    meta: {
      icon: 'lucide:copyright',
      link: 'https://github.com/vbenjs/vue-vben-admin', // 外部链接
      order: 9999,
      title: $t('demos.vben.about'),
    },
    name: 'VbenAbout',
    path: '/vben-admin/about',
  },
  {
    component: () => import('#/views/_core/about/index.vue'),
    meta: {
      icon: 'lucide:copyright',
      openInNewWindow: true, // 新窗口打开
      order: 9999,
      title: $t('demos.vben.about'),
    },
    name: 'VbenAbout',
    path: '/vben-admin/about',
  },
];
  1. 布局模式 选 ”双列菜单“ 或 "水平"
  2. 点击以上两个菜单

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
    Memory: 10.52 GB / 31.63 GB
  Binaries:
    Node: 20.10.0 - D:\NVM\nodejs\node.EXE
    npm: 10.2.3 - D:\NVM\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.112)
    Internet Explorer: 11.0.22621.3527

Relevant log output

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions