遇到 vue 一個問題,這裏記錄一下。
主要原因是因爲:key='data.path'
,這裏的 data 有問題,
看下面的字段,path
,這個字段 的值是一樣的
data 的值如下
[{
path: '/',
component: Layout,
redirect: '/gvrchat',
name: 'GVRCHAT',
// meta: { title: '紅包', icon: 'example' },
hidden: true,
children: [{
path: 'gvrchat',
component: () => import('@/views/dashboard/index')
}]
},
{
path: '/',
component: Layout,
name: 'Dashboard',
meta: { title: '設備', icon: 'example' },
// hidden: true,
children: [{
path: 'index',
component: () => import('@/views/device/index')
}]
}]