[Vue warn]: Duplicate keys detected: '/'. This may cause an update error.

遇到 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')
    }]
  }]
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章