@umijs/route-utils
Advanced tools
Comparing version 1.0.19 to 1.0.20
@@ -61,3 +61,3 @@ import getMatchMenu from './getMatchMenu'; | ||
icon: 'smile', | ||
path: 'flex', | ||
path: 'flex?name=qixian', | ||
component: './FlexDemo', | ||
@@ -64,0 +64,0 @@ }, |
@@ -5,2 +5,5 @@ import isEqual from 'lodash.isequal'; | ||
import { pathToRegexp } from '@qixian.cs/path-to-regexp'; | ||
function stripQueryStringAndHashFromPath(url) { | ||
return url.split("?")[0].split("#")[0]; | ||
} | ||
/* eslint no-useless-escape:0 import/prefer-default-export:0 */ | ||
@@ -151,3 +154,3 @@ const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; | ||
.map((item = { path: '/' }) => { | ||
const path = mergePath(item.path, parent ? parent.path : '/'); | ||
const path = stripQueryStringAndHashFromPath(mergePath(item.path, parent ? parent.path : '/')); | ||
const { name } = item; | ||
@@ -154,0 +157,0 @@ const locale = getItemLocaleName(item, parentName || 'menu'); |
@@ -65,4 +65,9 @@ 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); } | ||
import { pathToRegexp } from '@qixian.cs/path-to-regexp'; | ||
function stripQueryStringAndHashFromPath(url) { | ||
return url.split("?")[0].split("#")[0]; | ||
} | ||
/* eslint no-useless-escape:0 import/prefer-default-export:0 */ | ||
var reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; | ||
@@ -249,3 +254,3 @@ export var isUrl = function isUrl(path) { | ||
}; | ||
var path = mergePath(item.path, parent ? parent.path : '/'); | ||
var path = stripQueryStringAndHashFromPath(mergePath(item.path, parent ? parent.path : '/')); | ||
var name = item.name; | ||
@@ -252,0 +257,0 @@ var locale = getItemLocaleName(item, parentName || 'menu'); // if enableMenuLocale use item.name, |
@@ -79,3 +79,8 @@ "use strict"; | ||
function stripQueryStringAndHashFromPath(url) { | ||
return url.split("?")[0].split("#")[0]; | ||
} | ||
/* eslint no-useless-escape:0 import/prefer-default-export:0 */ | ||
var reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; | ||
@@ -270,3 +275,3 @@ | ||
}; | ||
var path = mergePath(item.path, parent ? parent.path : '/'); | ||
var path = stripQueryStringAndHashFromPath(mergePath(item.path, parent ? parent.path : '/')); | ||
var name = item.name; | ||
@@ -273,0 +278,0 @@ var locale = getItemLocaleName(item, parentName || 'menu'); // if enableMenuLocale use item.name, |
{ | ||
"name": "@umijs/route-utils", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"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
252777
3487