@umijs/route-utils
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -170,2 +170,9 @@ import isEqual from 'fast-deep-equal/es6/react'; | ||
pro_layout_parentKeys = [], children, icon, flatMenu, indexRoute, routes, ...restParent } = parent; | ||
const item_pro_layout_parentKeys = new Set([ | ||
...pro_layout_parentKeys, | ||
...(item.parentKeys || []), | ||
]); | ||
if (parent.key) { | ||
item_pro_layout_parentKeys.add(parent.key); | ||
} | ||
const finallyItem = { | ||
@@ -178,7 +185,3 @@ ...restParent, | ||
key: item.key || getKeyByPath({ ...item, path }), | ||
pro_layout_parentKeys: Array.from(new Set([ | ||
...(item.parentKeys || []), | ||
...pro_layout_parentKeys, | ||
`/${parent.key || ''}`.replace(/\/\//g, '/').replace(/\/\//g, '/'), | ||
])).filter((key) => key && key !== '/'), | ||
pro_layout_parentKeys: Array.from(item_pro_layout_parentKeys).filter((key) => key && key !== '/'), | ||
}; | ||
@@ -185,0 +188,0 @@ if (localeName) { |
@@ -272,2 +272,8 @@ 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); } | ||
var item_pro_layout_parentKeys = new Set([].concat(_toConsumableArray(pro_layout_parentKeys), _toConsumableArray(item.parentKeys || []))); | ||
if (parent.key) { | ||
item_pro_layout_parentKeys.add(parent.key); | ||
} | ||
var finallyItem = _objectSpread(_objectSpread(_objectSpread({}, restParent), {}, { | ||
@@ -281,3 +287,3 @@ menu: undefined | ||
})), | ||
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) { | ||
pro_layout_parentKeys: Array.from(item_pro_layout_parentKeys).filter(function (key) { | ||
return key && key !== '/'; | ||
@@ -284,0 +290,0 @@ }) |
@@ -295,2 +295,8 @@ "use strict"; | ||
var item_pro_layout_parentKeys = new Set([].concat(_toConsumableArray(pro_layout_parentKeys), _toConsumableArray(item.parentKeys || []))); | ||
if (parent.key) { | ||
item_pro_layout_parentKeys.add(parent.key); | ||
} | ||
var finallyItem = _objectSpread(_objectSpread(_objectSpread({}, restParent), {}, { | ||
@@ -304,3 +310,3 @@ menu: undefined | ||
})), | ||
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) { | ||
pro_layout_parentKeys: Array.from(item_pro_layout_parentKeys).filter(function (key) { | ||
return key && key !== '/'; | ||
@@ -307,0 +313,0 @@ }) |
{ | ||
"name": "@umijs/route-utils", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"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
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
123536
2321