Skip to content

关于隐藏菜单问题 #325

@zuihou

Description

@zuihou

问题: 路由配置时, 如何设置某个菜单的子菜单全部是隐藏菜单?

描述:

消息中心       (1级菜单)
├── 消息管理   (2级菜单)
│   ├── 发布消息   (3级隐藏菜单)
│   ├── 查看消息消息 (3级隐藏菜单)

代码结构

views        
├── msgcenter
│   ├── msg
│    │   ├── index.vue
│    │   ├── msgview
│    │    │   ├── index.vue
│    │   ├── msgedit
│    │    │   ├── index.vue
│   ├── template

目前效果
image

如上图所示, “消息管理” 下级显示了2个菜单, 我希望:

  1. 点击 “消息管理” 进入 views/msgcenter/msg/index.vue
  2. “发布消息” 和 “查看消息” 菜单隐藏起来,不在左侧菜单显示出来
  3. 在任意页面,点击 “发布消息” 按钮,跳转到 views/msgcenter/msg/msgview/index.vue
  4. 在任意页面,点击 “查看消息” 按钮,跳转到 views/msgcenter/msg/msgedit/index.vue
  5. 左侧菜单能正常显示 消息中心和消息管理,且消息管理能点击后跳转到 步骤1 中的地址。

自己做过的一些尝试:

  1. “发布消息” 和 “查看消息” 加了hideInMenu: true后,程序会按照这个方式显示。“消息管理” 无法点击
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions