@indfnd/common-mobile 1.0.3 → 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 +17 -0
- package/dist/ind-common-mobile.es.js +108 -56
- package/dist/ind-common-mobile.umd.cjs +7 -7
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
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
|
+
|
|
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)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* 修复山东加载中的问题 ([83ab069](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/83ab069e4aa240faf38d75d1fa20c1fbfcc4ea57))
|
|
21
|
+
|
|
5
22
|
### [1.0.3](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.2...v1.0.3) (2025-12-29)
|
|
6
23
|
|
|
7
24
|
|
|
@@ -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.
|
|
6
|
+
const version$2 = "1.0.4";
|
|
7
7
|
const author$1 = "huxuetong";
|
|
8
8
|
const publishConfig = {
|
|
9
9
|
registry: "https://registry.npmjs.org/"
|
|
@@ -2330,9 +2330,7 @@ var render$r = function() {
|
|
|
2330
2330
|
var _vm = this;
|
|
2331
2331
|
var _h = _vm.$createElement;
|
|
2332
2332
|
var _c = _vm._self._c || _h;
|
|
2333
|
-
return _c("IndLoadingPanel", { attrs: { "loading": _vm.loading } }, [_vm.curData && _vm.curData.length ? _c("van-list", { attrs: { "finished": _vm.finished, "offset": _vm.offset, "finished-text": _vm.finishedText, "
|
|
2334
|
-
_vm.loading = $$v;
|
|
2335
|
-
}, expression: "loading" } }, [_vm._l(_vm.curData, function(item2) {
|
|
2333
|
+
return _c("IndLoadingPanel", { attrs: { "loading": _vm.loading } }, [_vm.curData && _vm.curData.length ? _c("van-list", { attrs: { "value": _vm.loading, "finished": _vm.finished, "offset": _vm.offset, "finished-text": _vm.finishedText, "immediateCheck": false }, on: { "load": _vm.handleLoadMore } }, [_vm._l(_vm.curData, function(item2) {
|
|
2336
2334
|
return [_vm._t("item", null, { "item": item2 })];
|
|
2337
2335
|
})], 2) : _c("div", { staticClass: "ind-empty", staticStyle: { "height": "calc(100vh - 122px)" } })], 1);
|
|
2338
2336
|
};
|
|
@@ -28237,9 +28235,16 @@ var render$4 = function() {
|
|
|
28237
28235
|
_vm.searchValue = $$v;
|
|
28238
28236
|
}, expression: "searchValue" } })], 1), _c("van-popup", { staticStyle: { "width": "80%", "height": "50%" }, attrs: { "round": true }, model: { value: _vm.show, callback: function($$v) {
|
|
28239
28237
|
_vm.show = $$v;
|
|
28240
|
-
}, expression: "show" } }, [_c("
|
|
28241
|
-
return _c("
|
|
28242
|
-
|
|
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) {
|
|
28243
28248
|
return _c("div", { key: "tab" + idx, staticClass: "customnnnmmmm-tab-item", class: { active: _vm.active === idx }, on: { "click": function($event) {
|
|
28244
28249
|
return _vm.handleTabClick(idx);
|
|
28245
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 } })]);
|
|
@@ -28250,7 +28255,7 @@ var render$4 = function() {
|
|
|
28250
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) {
|
|
28251
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) {
|
|
28252
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) {
|
|
28253
|
-
return _c("van-grid-item", { key: menu.meta.permissionId
|
|
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);
|
|
28254
28259
|
}), 1) : _vm._e()], 1);
|
|
28255
28260
|
}), 0)]);
|
|
28256
28261
|
}), 0)])]), _c("tabbar")], 1)], 1);
|
|
@@ -28293,30 +28298,42 @@ const __vue2_script$4 = {
|
|
|
28293
28298
|
}
|
|
28294
28299
|
},
|
|
28295
28300
|
mounted() {
|
|
28296
|
-
var _a;
|
|
28297
28301
|
this.myAppList = JSON.parse(sessionStorage.getItem("myAppsList"));
|
|
28298
28302
|
this.isHb = location.pathname.includes("scyxweb");
|
|
28299
|
-
let
|
|
28300
|
-
|
|
28301
|
-
|
|
28302
|
-
|
|
28303
|
-
|
|
28304
|
-
|
|
28305
|
-
}
|
|
28306
|
-
|
|
28307
|
-
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
|
|
28311
|
-
|
|
28312
|
-
|
|
28313
|
-
|
|
28314
|
-
|
|
28315
|
-
|
|
28316
|
-
|
|
28317
|
-
|
|
28318
|
-
|
|
28319
|
-
|
|
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);
|
|
28320
28337
|
},
|
|
28321
28338
|
beforeDestroy() {
|
|
28322
28339
|
this.removeScrollHandler();
|
|
@@ -28561,9 +28578,16 @@ var render$3 = function() {
|
|
|
28561
28578
|
_vm.searchValue = $$v;
|
|
28562
28579
|
}, expression: "searchValue" } })], 1), _c("van-popup", { staticStyle: { "width": "80%", "height": "50%" }, attrs: { "round": true }, model: { value: _vm.show, callback: function($$v) {
|
|
28563
28580
|
_vm.show = $$v;
|
|
28564
|
-
}, expression: "show" } }, [_c("
|
|
28565
|
-
return _c("
|
|
28566
|
-
|
|
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) {
|
|
28567
28591
|
return _c("div", { key: "tab" + idx, staticClass: "customnnnmmmm-tab-item", class: { active: _vm.active === idx }, on: { "click": function($event) {
|
|
28568
28592
|
return _vm.handleTabClick(tab, idx);
|
|
28569
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 } })]);
|
|
@@ -28621,39 +28645,54 @@ const __vue2_script$3 = {
|
|
|
28621
28645
|
};
|
|
28622
28646
|
},
|
|
28623
28647
|
mounted() {
|
|
28624
|
-
var _a;
|
|
28625
28648
|
this.myAppList = JSON.parse(sessionStorage.getItem("myAppsList"));
|
|
28626
28649
|
this.isHb = location.pathname.includes("scyxweb");
|
|
28627
|
-
let
|
|
28628
|
-
|
|
28629
|
-
|
|
28630
|
-
|
|
28631
|
-
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28636
|
-
|
|
28637
|
-
|
|
28638
|
-
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
28643
|
-
|
|
28644
|
-
|
|
28645
|
-
|
|
28646
|
-
|
|
28647
|
-
|
|
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);
|
|
28648
28686
|
},
|
|
28649
28687
|
methods: {
|
|
28650
28688
|
handleTabClick(tab, index2) {
|
|
28689
|
+
var _a;
|
|
28651
28690
|
if (this.active === index2)
|
|
28652
28691
|
return;
|
|
28653
28692
|
this.active = index2;
|
|
28654
28693
|
this.apps_menus = this.allApps_menus[tab];
|
|
28655
28694
|
if (tab !== "\u5168\u90E8") {
|
|
28656
|
-
this.apps_menus = simplifyMenuTree(this.apps_menus.children);
|
|
28695
|
+
this.apps_menus = simplifyMenuTree(((_a = this.apps_menus) == null ? void 0 : _a.children) || []);
|
|
28657
28696
|
} else {
|
|
28658
28697
|
this.apps_menus = simplifyMenuTree(this.apps_menus);
|
|
28659
28698
|
}
|
|
@@ -28684,6 +28723,19 @@ const __vue2_script$3 = {
|
|
|
28684
28723
|
this.scrollToContent(this.active);
|
|
28685
28724
|
});
|
|
28686
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
|
+
},
|
|
28687
28739
|
onSearch() {
|
|
28688
28740
|
if (!this.searchValue.trim()) {
|
|
28689
28741
|
this.show = false;
|