修复版本差异导致的懒加载报错问题

This commit is contained in:
RuoYi 2021-12-16 16:34:20 +08:00
parent fef7ead0d5
commit 6e14601c7c
2 changed files with 13 additions and 12 deletions

View File

@ -65,6 +65,7 @@
"@vue/cli-plugin-eslint": "4.4.6", "@vue/cli-plugin-eslint": "4.4.6",
"@vue/cli-service": "4.4.6", "@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0", "babel-eslint": "10.1.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "4.1.0", "chalk": "4.1.0",
"connect": "3.6.6", "connect": "3.6.6",
"eslint": "7.15.0", "eslint": "7.15.0",

View File

@ -35,28 +35,28 @@ export const constantRoutes = [
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve) component: () => import('@/views/redirect')
} }
] ]
}, },
{ {
path: '/login', path: '/login',
component: (resolve) => require(['@/views/login'], resolve), component: () => import('@/views/login'),
hidden: true hidden: true
}, },
{ {
path: '/register', path: '/register',
component: (resolve) => require(['@/views/register'], resolve), component: () => import('@/views/register'),
hidden: true hidden: true
}, },
{ {
path: '/404', path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve), component: () => import('@/views/error/404'),
hidden: true hidden: true
}, },
{ {
path: '/401', path: '/401',
component: (resolve) => require(['@/views/error/401'], resolve), component: () => import('@/views/error/401'),
hidden: true hidden: true
}, },
{ {
@ -66,7 +66,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'index', path: 'index',
component: (resolve) => require(['@/views/index'], resolve), component: () => import('@/views/index'),
name: 'Index', name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: '首页', icon: 'dashboard', affix: true }
} }
@ -80,7 +80,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'profile', path: 'profile',
component: (resolve) => require(['@/views/system/user/profile/index'], resolve), component: () => import('@/views/system/user/profile/index'),
name: 'Profile', name: 'Profile',
meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }
} }
@ -93,7 +93,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'role/:userId(\\d+)', path: 'role/:userId(\\d+)',
component: (resolve) => require(['@/views/system/user/authRole'], resolve), component: () => import('@/views/system/user/authRole'),
name: 'AuthRole', name: 'AuthRole',
meta: { title: '分配角色', activeMenu: '/system/user' } meta: { title: '分配角色', activeMenu: '/system/user' }
} }
@ -106,7 +106,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'user/:roleId(\\d+)', path: 'user/:roleId(\\d+)',
component: (resolve) => require(['@/views/system/role/authUser'], resolve), component: () => import('@/views/system/role/authUser'),
name: 'AuthUser', name: 'AuthUser',
meta: { title: '分配用户', activeMenu: '/system/role' } meta: { title: '分配用户', activeMenu: '/system/role' }
} }
@ -119,7 +119,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'index/:dictId(\\d+)', path: 'index/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve), component: () => import('@/views/system/dict/data'),
name: 'Data', name: 'Data',
meta: { title: '字典数据', activeMenu: '/system/dict' } meta: { title: '字典数据', activeMenu: '/system/dict' }
} }
@ -132,7 +132,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'index', path: 'index',
component: (resolve) => require(['@/views/monitor/job/log'], resolve), component: () => import('@/views/monitor/job/log'),
name: 'JobLog', name: 'JobLog',
meta: { title: '调度日志', activeMenu: '/monitor/job' } meta: { title: '调度日志', activeMenu: '/monitor/job' }
} }
@ -145,7 +145,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'index', path: 'index',
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), component: () => import('@/views/tool/gen/editTable'),
name: 'GenEdit', name: 'GenEdit',
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
} }