那是因为路由这样写的(出现重复):

{
    path: '',
    redirect: 'index',
    component: (resolve) => require(['@/views/index'], resolve),
    name: 'index',
    meta: { title: '首页', noCache: true, affix: true },
    hidden: true
  },
  {
    path: '/index',
    component: (resolve) => require(['@/views/index'], resolve),
    name: 'index',
    meta: { title: '首页', noCache: true, affix: true },
    hidden: true
  },

改成这样即可:

{
    path: '',
    redirect: {
      name: 'index',
    },
  },
  {
    path: '/index',
    component: (resolve) => require(['@/views/index'], resolve),
    name: 'index',
    meta: { title: '首页', noCache: true, affix: true },
    hidden: true
  },

 

Logo

前往低代码交流专区

更多推荐