|
@@ -32,10 +32,6 @@ const permission = { |
|
@@ -32,10 +32,6 @@ const permission = { |
|
32
|
// 遍历后台传来的路由字符串,转换为组件对象
|
32
|
// 遍历后台传来的路由字符串,转换为组件对象
|
|
33
|
function filterAsyncRouter(asyncRouterMap) {
|
33
|
function filterAsyncRouter(asyncRouterMap) {
|
|
34
|
return asyncRouterMap.filter(route => {
|
34
|
return asyncRouterMap.filter(route => {
|
|
35
|
- if(!route.path){
|
|
|
|
36
|
- // 防止空路由出现的警告,设置默认path
|
|
|
|
37
|
- route.path = '/path';
|
|
|
|
38
|
- }
|
|
|
|
39
|
if (route.component) {
|
35
|
if (route.component) {
|
|
40
|
// Layout组件特殊处理
|
36
|
// Layout组件特殊处理
|
|
41
|
if (route.component === 'Layout') {
|
37
|
if (route.component === 'Layout') {
|