vue路由手动刷新后路径末尾会加上/

vue路由跳转路径是'/config',但手动刷新后会变成'/config/'

    path: '/adnormal',
    component: Layout,
    children: [{
      path: '',
      name: 'Adnormal',
      component: () => import('@/views/adnormal/index'),
      meta: { title: '异常事件', icon: 'adnormal', key: 'list3EventInfo' }
    }]
    path: '/config',
    component: Layout,
    children: [{
      path: '',
      name: 'Config',
      component: () => import('@/views/config/index'),
      meta: { title: '系统配置', icon: 'config', key: 'getSmsConfig' }
    }]

以上两个路由是一样的写法,但上面'/adnormal'就没有这个问题,再怎么刷新都不会变。
求大神解答下~

阅读 5.3k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题