@indfnd/common 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.21](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.20...v1.1.21) (2025-11-20)
6
+
7
+ ### [1.1.20](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.19...v1.1.20) (2025-11-20)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * 修改路由 ([7b442f9](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/7b442f9cb0ca791fff02f7f0c1a38d80305946d2))
13
+
5
14
  ### [1.1.19](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.18...v1.1.19) (2025-11-20)
6
15
 
7
16
 
@@ -5460,7 +5460,7 @@ var lodash = { exports: {} };
5460
5460
  })(lodash, lodash.exports);
5461
5461
  var _ = lodash.exports;
5462
5462
  const name$1 = "@indfnd/common";
5463
- const version = "1.1.18";
5463
+ const version = "1.1.20";
5464
5464
  const author = "huxuetong";
5465
5465
  const publishConfig = {
5466
5466
  registry: "https://registry.npmjs.org/"
@@ -71784,12 +71784,7 @@ function getPermissionType(type) {
71784
71784
  return Object.keys(PERMISSION_TYPE).find((key) => PERMISSION_TYPE[key] === type);
71785
71785
  }
71786
71786
  function filterMicroPermissionList(microType, permissionList = []) {
71787
- if (!microType)
71788
- return permissionList;
71789
- return permissionList.filter((item2) => {
71790
- const itemName = item2 && item2.permissionValue || "";
71791
- return itemName.startsWith(microType) || itemName.startsWith(`${config$1.routerBase}-${microType}`);
71792
- });
71787
+ return permissionList;
71793
71788
  }
71794
71789
  function permission2Router(list, microType) {
71795
71790
  console.log("permission2Router params", list, microType);
@@ -71994,10 +71989,13 @@ async function renderRoutes({
71994
71989
  return item2.permissionValue == to.name || item2.name == to.name;
71995
71990
  });
71996
71991
  if (!tempPer && to.path != "/") {
71997
- tempPer = microPermissionData.find((item2) => {
71992
+ let arr = microPermissionData.filter((item2) => {
71998
71993
  var _a, _b, _c;
71999
71994
  return ((_a = item2 == null ? void 0 : item2.uri) == null ? void 0 : _a.includes("?")) ? (_b = item2 == null ? void 0 : item2.uri) == null ? void 0 : _b.includes(to.path) : (_c = item2 == null ? void 0 : item2.uri) == null ? void 0 : _c.endsWith(to.path);
72000
71995
  });
71996
+ let urlList = arr.map((item2) => item2.uri);
71997
+ let urlMatchMin = _.minBy(urlList, (item2) => item2.length);
71998
+ tempPer = arr.find((item2) => item2.uri === urlMatchMin);
72001
71999
  }
72002
72000
  const perType = getPermissionType(tempPer.type || "");
72003
72001
  let tmpRoute = generatorRouteByPermission(permission2Router([tempPer], microType)[0]);