若依(前后端分离),页面刷新一次URL出现“//”,页面刷新两次直接404

vue3下的若依管理系统,前后端分离,创建菜单后手动生成路由,运行后不报错,但是刷新后上方URL就会变成双/,错误原因:router配置错误。

再刷新一次就会404。

若依(前后端分离),页面刷新一次URL出现“//”,页面刷新两次直接404_第1张图片

在控制台下方第一次也会警告产生了“//”

我的index.js

    path: '/test',
    component: Layout,
    hidden: true,
    children: [
      {
        path: 'test1',
        component: () => import('@/views/test/test1/index'),
        name: 'test1',
        meta: { title: 'test1', activeMenu: '/test/test1' }
      },
      {
        path: 'test2',
        component: () => import('@/views/test/test2/index'),
        name: 'test2',
        meta: { title: 'test2', activeMenu: '/test/test2' }
      },
      {
        path: 'test3',
        component: () => import('@/views/test/test3/index'),
        name: 'test3',
        meta: { title: 'test3', activeMenu: '/eest/test3' }
      }
 {
        path: 'test3',
        component: () => import('@/views/test/test3/index'),
        name: 'test3',
        meta: { title: 'test3', activeMenu: '/test/test3' }
      }

我的问题:在router下的index.js文件对test的配置错误,测试后感觉是由于大小写的问题,把所有大写换成小写就OK了。

你可能感兴趣的:(javascript,开发语言,ecmascript)