@indfnd/common-mobile 1.0.4 → 1.0.5

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,16 @@
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.5](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.4...v1.0.5) (2025-12-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修改 ([75c6a8a](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/75c6a8a01154d7cd4a598b46995205fd48344fd0))
11
+ * 修改 ([84f2cf0](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/84f2cf0eb8a6a180f43478b76da99cc66eb7efec))
12
+ * 修改 ([afe8c96](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/afe8c9644bdacf15e135807373865e217c6d806a))
13
+ * 修改 ([d3c5e85](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/d3c5e85a1a95e518d1a9dda9e693a796eb10bd1a))
14
+
5
15
  ### [1.0.4](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.3...v1.0.4) (2025-12-30)
6
16
 
7
17
 
@@ -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.3";
6
+ const version$2 = "1.0.4";
7
7
  const author$1 = "huxuetong";
8
8
  const publishConfig = {
9
9
  registry: "https://registry.npmjs.org/"
@@ -28235,9 +28235,16 @@ var render$4 = function() {
28235
28235
  _vm.searchValue = $$v;
28236
28236
  }, expression: "searchValue" } })], 1), _c("van-popup", { staticStyle: { "width": "80%", "height": "50%" }, attrs: { "round": true }, model: { value: _vm.show, callback: function($$v) {
28237
28237
  _vm.show = $$v;
28238
- }, expression: "show" } }, [_c("van-grid", { attrs: { "column-num": 4 } }, _vm._l(_vm.searchApp, function(item2, idx) {
28239
- return _c("van-grid-item", { key: idx }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": "off" }, on: { "touchend": _vm.routeTo } })], 1);
28240
- }), 1)], 1), _c("myapp", { attrs: { "icons": _vm.myAppList, "expanded": _vm.disMyapp, "list": _vm.paginatedApps }, on: { "edit": _vm.edit, "open": _vm.open } }), _c("div", { staticClass: "customnnnmmmm-tabs-container" }, [_c("div", { staticClass: "customnnnmmmm-tabs-header-wrapper" }, [_c("div", { ref: "tabsHeader", staticClass: "customnnnmmmm-tabs-header" }, _vm._l(_vm.apps_menus, function(tab, idx) {
28238
+ }, expression: "show" } }, [_c("div", { style: { display: "flex", flexWrap: "wrap" } }, _vm._l(_vm.searchApp, function(item2, idx) {
28239
+ return _c("div", { key: idx, style: {
28240
+ width: "calc(100% / 5)",
28241
+ height: "100%",
28242
+ backgroundColor: "#fff",
28243
+ display: "flex",
28244
+ alignItems: "center",
28245
+ justifyContent: "center"
28246
+ } }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": "off" }, on: { "touchend": _vm.routeTo } })], 1);
28247
+ }), 0)]), _c("myapp", { attrs: { "icons": _vm.myAppList, "expanded": _vm.disMyapp, "list": _vm.paginatedApps }, on: { "edit": _vm.edit, "open": _vm.open } }), _c("div", { staticClass: "customnnnmmmm-tabs-container" }, [_c("div", { staticClass: "customnnnmmmm-tabs-header-wrapper" }, [_c("div", { ref: "tabsHeader", staticClass: "customnnnmmmm-tabs-header" }, _vm._l(_vm.apps_menus, function(tab, idx) {
28241
28248
  return _c("div", { key: "tab" + idx, staticClass: "customnnnmmmm-tab-item", class: { active: _vm.active === idx }, on: { "click": function($event) {
28242
28249
  return _vm.handleTabClick(idx);
28243
28250
  } } }, [_c("div", { staticClass: "customnnnmmmm-tab-item-top", class: { active: _vm.active === idx } }, [_vm._v(" " + _vm._s(tab.meta.title) + " ")]), _c("div", { staticClass: "customnnnmmmm-tab-item-bottom", class: { active: _vm.active === idx } })]);
@@ -28248,7 +28255,7 @@ var render$4 = function() {
28248
28255
  }), 0), _c("div", { ref: "scrollContainer", staticClass: "ind-m-apps-container", staticStyle: { "padding-top": "0px", "padding-bottom": "500px", "height": "100%" } }, _vm._l(_vm.apps_menus[_vm.active] && _vm.apps_menus[_vm.active].children || [], function(item2, index2) {
28249
28256
  return _c("div", { key: index2, staticClass: "ind-m-menu-section", attrs: { "id": "section-" + _vm.active + "-" + index2, "data-index": index2 } }, [_c("div", { staticClass: "ind-m-divider-container" }, [_c("van-divider", { staticClass: "ind-m-custom-divider" }, [_vm._v(" " + _vm._s(item2.meta.title) + " ")])], 1), _c("div", { staticClass: "ind-m-menu-section-content" }, _vm._l((((_vm.apps_menus[_vm.active] || {}).children || [])[index2] || {}).children || [], function(subItem, subIndex) {
28250
28257
  return _c("div", { key: "level3-" + subIndex, class: ["ind-m-app-item-wrapper", { "full-width": subItem.children }] }, [!subItem.children ? _c("apps-item", { attrs: { "item": subItem, "state": subItem.state, "title": subItem.meta.title, "editStatus": "off" }, on: { "touchend": _vm.routeTo } }) : _vm._e(), subItem.children ? _c("div", { staticClass: "ind-m-category-header" }, [_c("div", { staticClass: "ind-m-category-indicator" }), _c("div", { staticClass: "ind-m-category-title" }, [_vm._v(_vm._s(subItem.meta.title))])]) : _vm._e(), subItem.children ? _c("van-grid", { attrs: { "border": false, "clickable": "", "gutter": 0, "column-num": 3 } }, _vm._l(_vm.apps_menus[_vm.active] && _vm.apps_menus[_vm.active].children[index2] && _vm.apps_menus[_vm.active].children[index2].children[subIndex] && _vm.apps_menus[_vm.active].children[index2].children[subIndex].children || [], function(menu) {
28251
- return _c("van-grid-item", { key: menu.meta.permissionId, staticClass: "menu" }, [_c("apps-item", { attrs: { "item": menu, "state": menu.state, "title": menu.meta.title, "editStatus": "off" }, on: { "touchend": _vm.routeTo } })], 1);
28258
+ return _c("van-grid-item", { key: menu.meta.permissionId }, [_c("apps-item", { attrs: { "item": menu, "state": menu.state, "title": menu.meta.title, "editStatus": "off" }, on: { "touchend": _vm.routeTo } })], 1);
28252
28259
  }), 1) : _vm._e()], 1);
28253
28260
  }), 0)]);
28254
28261
  }), 0)])]), _c("tabbar")], 1)], 1);
@@ -28291,30 +28298,42 @@ const __vue2_script$4 = {
28291
28298
  }
28292
28299
  },
28293
28300
  mounted() {
28294
- var _a;
28295
28301
  this.myAppList = JSON.parse(sessionStorage.getItem("myAppsList"));
28296
28302
  this.isHb = location.pathname.includes("scyxweb");
28297
- let menus = this.$store.getters.getMenuTreeList;
28298
- if (((_a = this.$config) == null ? void 0 : _a.mainType) == "singleApp") {
28299
- let mobileMainApp = menus.find(
28300
- (item2) => {
28301
- var _a2;
28302
- return item2.extendProps && ((_a2 = JSON.parse(item2.extendProps)) == null ? void 0 : _a2.mainMobile) == "1";
28303
- }
28304
- );
28305
- menus = mobileMainApp.children;
28306
- }
28307
- let temps = menus.filter((item2) => item2.name === this.name);
28308
- this.apps_menus = temps[0].children;
28309
- this.title = temps[0].meta.title;
28310
- this.appsMenusExtended(this.apps_menus);
28311
- this.tabActiveKeys = {};
28312
- this.apps_menus.forEach((_2, index2) => {
28313
- this.$set(this.tabActiveKeys, index2, 0);
28314
- });
28315
- this.initScrollHandler();
28316
- this.cacheSectionPositions();
28317
- this.setupResizeObserver();
28303
+ let interval = setInterval(() => {
28304
+ var _a;
28305
+ retryCount++;
28306
+ let menus = this.$store.getters.getMenuTreeList || [];
28307
+ if (menus && menus.length > 0) {
28308
+ clearInterval(interval);
28309
+ console.log(`\u7B2C${retryCount}\u6B21\u5C1D\u8BD5\uFF0C\u6210\u529F\u83B7\u53D6\u5230 menus:`, menus);
28310
+ if (((_a = this.$config) == null ? void 0 : _a.mainType) == "singleApp") {
28311
+ let mobileMainApp = menus.find(
28312
+ (item2) => {
28313
+ var _a2;
28314
+ return item2.extendProps && ((_a2 = JSON.parse(item2.extendProps)) == null ? void 0 : _a2.mainMobile) == "1";
28315
+ }
28316
+ );
28317
+ menus = mobileMainApp.children;
28318
+ }
28319
+ let temps = menus.filter((item2) => item2.name === this.name);
28320
+ this.apps_menus = temps[0].children;
28321
+ this.title = temps[0].meta.title;
28322
+ this.appsMenusExtended(this.apps_menus);
28323
+ this.tabActiveKeys = {};
28324
+ this.apps_menus.forEach((_2, index2) => {
28325
+ this.$set(this.tabActiveKeys, index2, 0);
28326
+ });
28327
+ this.initScrollHandler();
28328
+ this.cacheSectionPositions();
28329
+ this.setupResizeObserver();
28330
+ } else if (retryCount >= MAX_RETRY) {
28331
+ clearInterval(interval);
28332
+ console.warn(`\u5C1D\u8BD5${MAX_RETRY}\u6B21\u540E\u4ECD\u672A\u83B7\u53D6\u5230 menus`);
28333
+ } else {
28334
+ console.log(`\u7B2C${retryCount}\u6B21\u5C1D\u8BD5\uFF0C\u7B49\u5F85\u83B7\u53D6 menus...`);
28335
+ }
28336
+ }, 100);
28318
28337
  },
28319
28338
  beforeDestroy() {
28320
28339
  this.removeScrollHandler();
@@ -28559,9 +28578,16 @@ var render$3 = function() {
28559
28578
  _vm.searchValue = $$v;
28560
28579
  }, expression: "searchValue" } })], 1), _c("van-popup", { staticStyle: { "width": "80%", "height": "50%" }, attrs: { "round": true }, model: { value: _vm.show, callback: function($$v) {
28561
28580
  _vm.show = $$v;
28562
- }, expression: "show" } }, [_c("van-grid", { attrs: { "column-num": 4 } }, _vm._l(_vm.searchApp, function(item2, idx) {
28563
- return _c("van-grid-item", { key: idx }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": "off" }, on: { "touchend": _vm.routeTo } })], 1);
28564
- }), 1)], 1), _c("myapp", { attrs: { "icons": _vm.myAppList, "expanded": _vm.disMyapp, "list": _vm.paginatedApps }, on: { "edit": _vm.edit, "open": _vm.open } }), _c("div", [_c("div", { staticClass: "customnnnmmmm-tabs-header-wrapper" }, [_c("div", { ref: "tabsHeader", staticClass: "customnnnmmmm-tabs-header" }, _vm._l(_vm.titleList, function(tab, idx) {
28581
+ }, expression: "show" } }, [_c("div", { style: { display: "flex", flexWrap: "wrap" } }, _vm._l(_vm.searchApp, function(item2, idx) {
28582
+ return _c("div", { key: idx, style: {
28583
+ width: "calc(100% / 5)",
28584
+ height: "100%",
28585
+ backgroundColor: "#fff",
28586
+ display: "flex",
28587
+ alignItems: "center",
28588
+ justifyContent: "center"
28589
+ } }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": "off" }, on: { "touchend": _vm.routeTo } })], 1);
28590
+ }), 0)]), _c("myapp", { attrs: { "icons": _vm.myAppList, "expanded": _vm.disMyapp, "list": _vm.paginatedApps }, on: { "edit": _vm.edit, "open": _vm.open } }), _c("div", [_c("div", { staticClass: "customnnnmmmm-tabs-header-wrapper" }, [_c("div", { ref: "tabsHeader", staticClass: "customnnnmmmm-tabs-header" }, _vm._l(_vm.titleList, function(tab, idx) {
28565
28591
  return _c("div", { key: "tab" + idx, staticClass: "customnnnmmmm-tab-item", class: { active: _vm.active === idx }, on: { "click": function($event) {
28566
28592
  return _vm.handleTabClick(tab, idx);
28567
28593
  } } }, [_c("div", { staticClass: "customnnnmmmm-tab-item-top", class: { active: _vm.active === idx } }, [_vm._v(" " + _vm._s(tab) + " ")]), _c("div", { staticClass: "customnnnmmmm-tab-item-bottom", class: { active: _vm.active === idx } })]);
@@ -28619,39 +28645,54 @@ const __vue2_script$3 = {
28619
28645
  };
28620
28646
  },
28621
28647
  mounted() {
28622
- var _a;
28623
28648
  this.myAppList = JSON.parse(sessionStorage.getItem("myAppsList"));
28624
28649
  this.isHb = location.pathname.includes("scyxweb");
28625
- let menus = this.$store.getters.getMenuTreeList;
28626
- if (((_a = this.$config) == null ? void 0 : _a.mainType) == "singleApp") {
28627
- let mobileMainApp = menus.find(
28628
- (item2) => {
28629
- var _a2;
28630
- return item2.extendProps && ((_a2 = JSON.parse(item2.extendProps)) == null ? void 0 : _a2.mainMobile) == "1";
28631
- }
28632
- );
28633
- menus = mobileMainApp.children;
28634
- }
28635
- let temps = menus.filter((item2) => item2.name === this.name);
28636
- let titleList = temps[0].children.map((item2) => item2.meta.title);
28637
- this.titleList = ["\u5168\u90E8", ...titleList];
28638
- const allApps_menus = temps[0].children.reduce((obj, item2) => {
28639
- obj[item2.meta.title] = item2;
28640
- return obj;
28641
- }, {});
28642
- this.allApps_menus = { \u5168\u90E8: temps[0].children, ...allApps_menus };
28643
- this.apps_menus = this.allApps_menus["\u5168\u90E8"];
28644
- this.apps_menus = simplifyMenuTree(this.apps_menus);
28645
- this.title = temps[0].meta.title;
28650
+ let retryCount2 = 0;
28651
+ const MAX_RETRY2 = 50;
28652
+ let interval = setInterval(() => {
28653
+ var _a;
28654
+ retryCount2++;
28655
+ let menus = this.$store.getters.getMenuTreeList || [];
28656
+ if (menus && menus.length > 0) {
28657
+ clearInterval(interval);
28658
+ console.log(`\u7B2C${retryCount2}\u6B21\u5C1D\u8BD5\uFF0C\u6210\u529F\u83B7\u53D6\u5230 menus:`, menus);
28659
+ if (((_a = this.$config) == null ? void 0 : _a.mainType) == "singleApp") {
28660
+ let mobileMainApp = menus.find(
28661
+ (item2) => {
28662
+ var _a2;
28663
+ return item2.extendProps && ((_a2 = JSON.parse(item2.extendProps)) == null ? void 0 : _a2.mainMobile) == "1";
28664
+ }
28665
+ );
28666
+ menus = mobileMainApp.children;
28667
+ }
28668
+ let temps = menus.filter((item2) => item2.name === this.name);
28669
+ let titleList = temps[0].children.map((item2) => item2.meta.title);
28670
+ this.titleList = ["\u5168\u90E8", ...titleList];
28671
+ const allApps_menus = temps[0].children.reduce((obj, item2) => {
28672
+ obj[item2.meta.title] = item2;
28673
+ return obj;
28674
+ }, {});
28675
+ this.allApps_menus = { \u5168\u90E8: temps[0].children, ...allApps_menus };
28676
+ this.apps_menus = this.allApps_menus["\u5168\u90E8"];
28677
+ this.apps_menus = simplifyMenuTree(this.apps_menus);
28678
+ this.title = temps[0].meta.title;
28679
+ } else if (retryCount2 >= MAX_RETRY2) {
28680
+ clearInterval(interval);
28681
+ console.warn(`\u5C1D\u8BD5${MAX_RETRY2}\u6B21\u540E\u4ECD\u672A\u83B7\u53D6\u5230 menus`);
28682
+ } else {
28683
+ console.log(`\u7B2C${retryCount2}\u6B21\u5C1D\u8BD5\uFF0C\u7B49\u5F85\u83B7\u53D6 menus...`);
28684
+ }
28685
+ }, 100);
28646
28686
  },
28647
28687
  methods: {
28648
28688
  handleTabClick(tab, index2) {
28689
+ var _a;
28649
28690
  if (this.active === index2)
28650
28691
  return;
28651
28692
  this.active = index2;
28652
28693
  this.apps_menus = this.allApps_menus[tab];
28653
28694
  if (tab !== "\u5168\u90E8") {
28654
- this.apps_menus = simplifyMenuTree(this.apps_menus.children);
28695
+ this.apps_menus = simplifyMenuTree(((_a = this.apps_menus) == null ? void 0 : _a.children) || []);
28655
28696
  } else {
28656
28697
  this.apps_menus = simplifyMenuTree(this.apps_menus);
28657
28698
  }
@@ -28682,6 +28723,19 @@ const __vue2_script$3 = {
28682
28723
  this.scrollToContent(this.active);
28683
28724
  });
28684
28725
  },
28726
+ scrollToContent(index2) {
28727
+ this.$nextTick(() => {
28728
+ const container = document.querySelector(".ind-my-app-container");
28729
+ const targetSection = container.children[index2];
28730
+ if (targetSection) {
28731
+ const scrollPosition = targetSection.offsetTop - 3;
28732
+ container.scrollTo({
28733
+ top: scrollPosition,
28734
+ behavior: "smooth"
28735
+ });
28736
+ }
28737
+ });
28738
+ },
28685
28739
  onSearch() {
28686
28740
  if (!this.searchValue.trim()) {
28687
28741
  this.show = false;