首页 > 其他 > 详细

vue-router 子路由时,父级component设置

时间:2021-03-10 16:32:08      阅读:232      评论:0      收藏:0      [点我收藏+]

component使用对象形式,使用render函数进行处理

 1 {
 2   path: ‘/system‘,
 3   name: ‘System‘,
 4   meta: {
 5     title: ‘系统设置‘,
 6     icon: ‘el-icon-setting‘
 7   },
 8   component: {
 9     render(h: CreateElement) {
10       return h(‘router-view‘)
11     }
12   },
13   children: [
14     {
15       path: ‘permission‘,
16       name: ‘Permission‘,
17       meta: {
18         title: ‘权限设置‘,
19         icon: ‘el-icon-set-up‘
20       },
21       component: () => import(‘@/views/system/Permission.vue‘),
22     },
23   ]
24 }

 

vue-router 子路由时,父级component设置

原文:https://www.cnblogs.com/zhizou/p/14512422.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!