[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')
    }]
  }]

猜你喜欢

转载自blog.csdn.net/u014196765/article/details/88567610
今日推荐