From a941c1b488581e7a3e43e613d06d6c8af31f8edb Mon Sep 17 00:00:00 2001 From: 若依 <yzz_ivy@163.com> Date: 星期三, 09 十二月 2020 10:27:34 +0800 Subject: [PATCH] !134 修改 代码生成 预览无法左右滑动 Merge pull request !134 from 〝走走停停/master --- ruoyi-ui/src/store/modules/permission.js | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index bfd5988..260d8af 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -1,6 +1,7 @@ import { constantRoutes } from '@/router' import { getRouters } from '@/api/menu' import Layout from '@/layout/index' +import ParentView from '@/components/ParentView'; const permission = { state: { @@ -32,14 +33,12 @@ // 遍历后台传来的路由字符串,转换为组件对象 function filterAsyncRouter(asyncRouterMap) { return asyncRouterMap.filter(route => { - if(!route.path){ - // 防止空路由出现的警告,设置默认path - route.path = '/path'; - } if (route.component) { - // Layout组件特殊处理 + // Layout ParentView 组件特殊处理 if (route.component === 'Layout') { route.component = Layout + } else if (route.component === 'ParentView') { + route.component = ParentView } else { route.component = loadView(route.component) } -- Gitblit v1.9.2