vue-router 子路由時,父級component設置


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 }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM