Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于菜单隐藏问题 #8

Open
anaf007 opened this issue Sep 27, 2022 · 0 comments
Open

关于菜单隐藏问题 #8

anaf007 opened this issue Sep 27, 2022 · 0 comments

Comments

@anaf007
Copy link

anaf007 commented Sep 27, 2022

当我在 \src\router\index.js 中增加


{
        path: '/goods/add_goods',
        name: 'add_goods',
        hidden: true,
        component: () => import('@/views/goods/add_goods.vue'),
        meta: {
          title: "添加商品",
          icon: 'icon-link-cloud-faild',
        },
      },

hidden: true,无法生效。菜单还是被显示出来了

在修改 \src\layouts\components\Menu\MenuItem.vue
35行

<el-menu-item v-else :index="option.path" :key="index">
<el-menu-item v-else-if="!option.hidden" :index="option.path" :key="index" >

就可以实现菜单隐藏了。这个是,请问我修改得对了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant