我是靠谱客的博主 靓丽橘子,这篇文章主要介绍vue-element-admin 菜单标签失效的解决方式,现在分享给大家,希望可以做个参考。

设置菜单路由时,代码如下:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ path: '/materieluse', component: Layout, meta: { title: '仓库管理', icon: 'component' }, children: [{ path: 'materielList', component: () => import('@/views/materieluse/materielList'), name: 'icons', meta: { title: '请料管理' } }, { path: 'itemDbList', component: () => import('@/views/materieluse/itemDbList'), name: 'icons', meta: { title: '项目仓库' } }] },

面板中的对应标签失效,经查资料,得知:name: "router-name"; //设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题,同时noCache: true 设置了也会失效

因此正确代码如下:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ path: '/materieluse', component: Layout, meta: { title: '仓库管理', icon: 'component' }, children: [{ path: 'materielList', component: () => import('@/views/materieluse/materielList'), name: 'materielList', meta: { title: '请料管理' } }, { path: 'itemDbList', component: () => import('@/views/materieluse/itemDbList'), name: 'itemDbList', meta: { title: '项目仓库' } }] },

以上这篇vue-element-admin 菜单标签失效的解决方式就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持靠谱客。

最后

以上就是靓丽橘子最近收集整理的关于vue-element-admin 菜单标签失效的解决方式的全部内容,更多相关vue-element-admin内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(250)

评论列表共有 0 条评论

立即
投稿
返回
顶部