@umijs/route-utils
Advanced tools
Comparing version 1.0.29 to 1.0.30
@@ -173,6 +173,7 @@ import isEqual from 'lodash.isequal'; | ||
routes: null, | ||
pro_layout_parentKeys: [ | ||
pro_layout_parentKeys: Array.from(new Set([ | ||
...(item.parentKeys || []), | ||
...pro_layout_parentKeys, | ||
`/${parent.key || ''}`.replace(/\/\//g, '/').replace(/\/\//g, '/'), | ||
].filter((key) => key && key !== '/'), | ||
])).filter((key) => key && key !== '/'), | ||
}; | ||
@@ -179,0 +180,0 @@ if (localeName) { |
@@ -284,2 +284,3 @@ import transformRoute from './transformRoute'; | ||
path: 'drill', | ||
parentKeys: ['/dashboard'], | ||
component: './Welcome', | ||
@@ -286,0 +287,0 @@ }, |
@@ -19,3 +19,4 @@ export interface Route extends MenuDataItem { | ||
path?: string; | ||
parentKeys?: string[]; | ||
[key: string]: any; | ||
} |
@@ -279,3 +279,3 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
routes: null, | ||
pro_layout_parentKeys: [].concat(_toConsumableArray(pro_layout_parentKeys), ["/".concat(parent.key || '').replace(/\/\//g, '/').replace(/\/\//g, '/')]).filter(function (key) { | ||
pro_layout_parentKeys: Array.from(new Set([].concat(_toConsumableArray(item.parentKeys || []), _toConsumableArray(pro_layout_parentKeys), ["/".concat(parent.key || '').replace(/\/\//g, '/').replace(/\/\//g, '/')]))).filter(function (key) { | ||
return key && key !== '/'; | ||
@@ -282,0 +282,0 @@ }) |
@@ -300,3 +300,3 @@ "use strict"; | ||
routes: null, | ||
pro_layout_parentKeys: [].concat(_toConsumableArray(pro_layout_parentKeys), ["/".concat(parent.key || '').replace(/\/\//g, '/').replace(/\/\//g, '/')]).filter(function (key) { | ||
pro_layout_parentKeys: Array.from(new Set([].concat(_toConsumableArray(item.parentKeys || []), _toConsumableArray(pro_layout_parentKeys), ["/".concat(parent.key || '').replace(/\/\//g, '/').replace(/\/\//g, '/')]))).filter(function (key) { | ||
return key && key !== '/'; | ||
@@ -303,0 +303,0 @@ }) |
{ | ||
"name": "@umijs/route-utils", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"description": "Quickly process the routing of umi", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369827
4397