@indfnd/common-mobile 1.0.75 → 1.0.77

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.0.77](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.76...v1.0.77) (2026-04-07)
6
+
7
+ ### [1.0.76](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.75...v1.0.76) (2026-04-07)
8
+
9
+
10
+ ### Features
11
+
12
+ * 优化 ([0db7eee](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/0db7eee200dc2c4d64ee6f75122169955d730186))
13
+
5
14
  ### [1.0.75](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.74...v1.0.75) (2026-04-03)
6
15
 
7
16
 
@@ -3,7 +3,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
3
3
  import Vue$1 from "vue";
4
4
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
5
5
  const name$1 = "@indfnd/common-mobile";
6
- const version$2 = "1.0.74";
6
+ const version$2 = "1.0.76";
7
7
  const author$1 = "huxuetong";
8
8
  const publishConfig = {
9
9
  registry: "https://registry.npmjs.org/"
@@ -31785,11 +31785,29 @@ function filterMicroPermissionList(microType, permissionList = []) {
31785
31785
  return itemName.startsWith(microType) || itemName.startsWith(`${config$1.routerBase}-${microType}`);
31786
31786
  });
31787
31787
  }
31788
- function listToMenuTree({ list: list2, menuTree, pageNode, parentId, crumbs, root: root2 }) {
31788
+ function buildChildrenMap(list2) {
31789
+ const childrenMap = /* @__PURE__ */ new Map();
31790
+ if (!list2)
31791
+ return childrenMap;
31792
+ list2.forEach((item2) => {
31793
+ const { pid } = item2;
31794
+ if (!childrenMap.has(pid)) {
31795
+ childrenMap.set(pid, []);
31796
+ }
31797
+ childrenMap.get(pid).push(item2);
31798
+ });
31799
+ return childrenMap;
31800
+ }
31801
+ function listToMenuTree({ list: list2, childrenMap, menuTree, pageNode, parentId, crumbs, root: root2 }) {
31789
31802
  if (!list2)
31790
31803
  return;
31804
+ if (!childrenMap) {
31805
+ childrenMap = buildChildrenMap(list2);
31806
+ }
31807
+ console.log("childrenMap now is", childrenMap);
31791
31808
  let appInfo = getSessionStorage("appInfo");
31792
- list2.forEach((item2) => {
31809
+ const siblings = childrenMap.get(parentId) || [];
31810
+ siblings.forEach((item2) => {
31793
31811
  var _a;
31794
31812
  const {
31795
31813
  permissionId,
@@ -31829,7 +31847,7 @@ function listToMenuTree({ list: list2, menuTree, pageNode, parentId, crumbs, roo
31829
31847
  } catch (e) {
31830
31848
  hideInIbp2 = false;
31831
31849
  }
31832
- if (pid === parentId && !(hideInIbp1 || hideInIbp2)) {
31850
+ if (!(hideInIbp1 || hideInIbp2)) {
31833
31851
  if (isMenuPermissionType(type2)) {
31834
31852
  let node = {
31835
31853
  type: type2,
@@ -31848,6 +31866,7 @@ function listToMenuTree({ list: list2, menuTree, pageNode, parentId, crumbs, roo
31848
31866
  }
31849
31867
  listToMenuTree({
31850
31868
  list: list2,
31869
+ childrenMap,
31851
31870
  menuTree: node.children,
31852
31871
  pageNode,
31853
31872
  parentId: permissionId,