@indfnd/common-mobile 0.0.101 → 0.0.102

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,19 @@
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
+ ### [0.0.102](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.101...v0.0.102) (2025-10-14)
6
+
7
+
8
+ ### Features
9
+
10
+ * 兼容湖北 ([06e574b](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/06e574ba7f29d13fd0a4f32bcfc19cd4858b94ec))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * 我的应用轮播展示 ([f68faeb](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/f68faeb84ab08ec4fbcc0826390232f8cab84999))
16
+ * 修改 ([80fdf17](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/80fdf17e5f30efef478c05cc969d9bd531ab40cf))
17
+
5
18
  ### [0.0.101](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.100...v0.0.101) (2025-10-10)
6
19
 
7
20
  ### [0.0.100](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.99...v0.0.100) (2025-09-26)
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
2
2
  import Vue$1 from "vue";
3
3
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
4
4
  const name$1 = "@indfnd/common-mobile";
5
- const version$2 = "0.0.100";
5
+ const version$2 = "0.0.101";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -43341,7 +43341,14 @@ const __vue2_script$o = {
43341
43341
  computed: {
43342
43342
  finished() {
43343
43343
  let isFinished = this.curData.length == this.datas.length || this.curData.length == this.total;
43344
- console.log("isFinished", "this.curData.length", this.curData.length, "this.total", this.total, isFinished);
43344
+ console.log(
43345
+ "isFinished",
43346
+ "this.curData.length",
43347
+ this.curData.length,
43348
+ "this.total",
43349
+ this.total,
43350
+ isFinished
43351
+ );
43345
43352
  return isFinished;
43346
43353
  },
43347
43354
  paginationParams() {
@@ -44723,7 +44730,15 @@ const __vue2_script$j = {
44723
44730
  initConfig() {
44724
44731
  var _a, _b;
44725
44732
  if (this.xmlInfo) {
44726
- const { dataUrl, methods, pageBtnText, columns: columns2, searchFormFields, formFieldList, subTable } = generateConfigByXml(this.xmlInfo, this.isTransfer);
44733
+ const {
44734
+ dataUrl,
44735
+ methods,
44736
+ pageBtnText,
44737
+ columns: columns2,
44738
+ searchFormFields,
44739
+ formFieldList,
44740
+ subTable
44741
+ } = generateConfigByXml(this.xmlInfo, this.isTransfer);
44727
44742
  this.pageBtnText = pageBtnText;
44728
44743
  this.columns = columns2;
44729
44744
  this.dataUrl = dataUrl;
@@ -64049,7 +64064,7 @@ var render$5 = function() {
64049
64064
  var _vm = this;
64050
64065
  var _h = _vm.$createElement;
64051
64066
  var _c = _vm._self._c || _h;
64052
- return _c("div", { staticStyle: { "height": "100%" }, on: { "touchstart": function($event) {
64067
+ return _c("div", { on: { "touchstart": function($event) {
64053
64068
  return _vm.ontouchstart(_vm.item);
64054
64069
  }, "touchmove": function($event) {
64055
64070
  return _vm.ontouchmove(_vm.item);
@@ -64059,7 +64074,7 @@ var render$5 = function() {
64059
64074
  return _vm.ontouchend(_vm.item);
64060
64075
  } } }, [_vm.editStatus == "minus" || _vm.editStatus == "plus" && _vm.state ? _c("div", { staticStyle: { "text-align": "center" } }, [_c("van-badge", { attrs: { "color": "#999" }, scopedSlots: _vm._u([{ key: "content", fn: function() {
64061
64076
  return [_c("van-icon", { staticStyle: { "line-height": "1.5" }, attrs: { "name": _vm.editStatus } })];
64062
- }, proxy: true }], null, false, 1274909998) }, [_c("van-image", { attrs: { "with": "3rem", "height": "3rem", "fit": "cover", "src": _vm.getImg(_vm.item.meta.icon) } })], 1)], 1) : _c("div", { staticStyle: { "text-align": "center" } }, [_c("van-image", { attrs: { "with": "3rem", "height": "3rem", "fit": "cover", "src": _vm.getImg(_vm.item.meta.icon) } })], 1), _c("div", { staticStyle: { "text-align": "center" } }, [_c("div", { staticStyle: { "font-size": "12px", "display": "-webkit-box", "-webkit-box-orient": "vertical", "-webkit-line-clamp": "2", "overflow": "hidden", "text-overflow": "ellipsis", "line-height": "1.2", "max-height": "2.4em" } }, [_vm._v(" " + _vm._s(_vm.item.meta.title) + " ")])])]);
64077
+ }, proxy: true }], null, false, 1274909998) }, [_c("van-image", { attrs: { "with": "3rem", "height": "3rem", "fit": "cover", "src": _vm.getImg(_vm.item.meta.icon) } })], 1)], 1) : _c("div", { staticStyle: { "text-align": "center" } }, [_c("van-image", { attrs: { "with": "3rem", "height": "3rem", "fit": "cover", "src": _vm.getImg(_vm.item.meta.icon) } })], 1), _c("div", { staticStyle: { "text-align": "center" } }, [_c("div", { staticStyle: { "font-size": "12px", "display": "-webkit-box", "-webkit-box-orient": "vertical", "-webkit-line-clamp": "1", "overflow": "hidden", "text-overflow": "ellipsis", "line-height": "1.2", "max-height": "2.4em" } }, [_vm._v(" " + _vm._s(_vm.item.meta.title) + " ")])])]);
64063
64078
  };
64064
64079
  var staticRenderFns$5 = [];
64065
64080
  const __vue2_script$5 = {
@@ -68941,9 +68956,7 @@ var render$2 = function() {
68941
68956
  var _vm = this;
68942
68957
  var _h = _vm.$createElement;
68943
68958
  var _c = _vm._self._c || _h;
68944
- return _c("div", { staticClass: "ind-m-app-center" }, [_c("van-sticky", [_c("van-nav-bar", { attrs: { "placeholder": true, "safe-area-inset-top": true, "title": _vm.title } })], 1), _c("div", { staticClass: "ind-m-app-page" }, [_c("div", { staticClass: "ind-m-placeholder" }, [_c("van-search", { attrs: { "placeholder": "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD", "shape": "round" }, on: { "search": _vm.onSearch, "clear": _vm.onClear }, scopedSlots: _vm._u([{ key: "right-icon", fn: function() {
68945
- return [_c("div", { on: { "click": _vm.onSearch } }, [_vm._v("\u641C\u7D22")])];
68946
- }, proxy: true }, { key: "left-icon", fn: function() {
68959
+ return _c("div", { staticClass: "ind-m-app-center" }, [_c("van-sticky", [_c("van-nav-bar", { attrs: { "placeholder": true, "safe-area-inset-top": true, "title": _vm.title } })], 1), _c("div", { staticClass: "ind-m-app-page" }, [_c("div", { staticClass: "ind-m-placeholder" }, [_c("van-search", { attrs: { "placeholder": "\u641C\u7D22\u5E94\u7528" }, on: { "search": _vm.onSearch, "clear": _vm.onClear }, scopedSlots: _vm._u([{ key: "left-icon", fn: function() {
68947
68960
  return [_c("van-icon", { attrs: { "name": "search" } })];
68948
68961
  }, proxy: true }]), model: { value: _vm.searchValue, callback: function($$v) {
68949
68962
  _vm.searchValue = $$v;
@@ -68951,8 +68964,10 @@ var render$2 = function() {
68951
68964
  _vm.show = $$v;
68952
68965
  }, expression: "show" } }, [_c("van-grid", { attrs: { "column-num": 4 } }, _vm._l(_vm.searchApp, function(item2, idx) {
68953
68966
  return _c("van-grid-item", { key: idx }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": _vm.currentEditStatus == "on" ? "minus" : "off" }, on: { "touchend": _vm.rmFromMyAppsClick } })], 1);
68954
- }), 1)], 1), _c("div", { staticClass: "ind-m-myApp-container" }, [_c("div", { staticClass: "ind-m-myApp-inner" }, [_c("div", { staticClass: "ind-m-myApp-container-top" }, [_c("div", { staticClass: "ind-m-my-apps-title" }, [_vm._v("\u6211\u7684\u5E94\u7528")]), _c("van-button", { staticClass: "ind-m-edit-btn", attrs: { "size": "small", "type": "info", "text": _vm.editButtonName }, on: { "click": _vm.toggleEdit } })], 1), _c("van-grid", { attrs: { "column-num": 4 } }, _vm._l(_vm.isEditing ? _vm.tempMyApps : _vm.my_apps, function(item2, idx) {
68955
- return _c("van-grid-item", { key: idx }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": _vm.currentEditStatus == "on" ? "minus" : "off" }, on: { "touchend": _vm.rmFromMyAppsClick } })], 1);
68967
+ }), 1)], 1), _c("div", { staticClass: "ind-m-myApp-container" }, [_c("div", { staticClass: "ind-m-myApp-inner" }, [_c("div", { staticClass: "ind-m-myApp-container-top" }, [_c("div", { staticClass: "ind-m-my-apps-title" }, [_vm._v("\u6211\u7684\u5E94\u7528")]), _c("van-button", { staticClass: "ind-m-edit-btn", attrs: { "size": "small", "type": "info", "text": _vm.editButtonName }, on: { "click": _vm.toggleEdit } })], 1), _c("van-swipe", { attrs: { "show-indicators": true, "loop": false, "indicator-color": "#005aaf" } }, _vm._l(_vm.paginatedApps, function(page, pageIdx) {
68968
+ return _c("van-swipe-item", { key: pageIdx }, [_c("div", { style: { paddingBottom: _vm.paginatedApps.length > 1 ? "20px" : "0" } }, [_c("van-grid", { attrs: { "column-num": 4, "border": false } }, _vm._l(page, function(item2, idx) {
68969
+ return _c("van-grid-item", { key: idx }, [_c("apps-item", { attrs: { "item": item2, "state": item2.state, "editStatus": _vm.currentEditStatus == "on" ? "minus" : "off" }, on: { "touchend": _vm.rmFromMyAppsClick } })], 1);
68970
+ }), 1)], 1)]);
68956
68971
  }), 1)], 1)]), _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) {
68957
68972
  return _c("div", { key: "tab" + idx, staticClass: "customnnnmmmm-tab-item", class: { active: _vm.active === idx }, on: { "click": function($event) {
68958
68973
  return _vm.handleTabClick(idx);
@@ -68995,7 +69010,8 @@ const __vue2_script$2 = {
68995
69010
  offsetTop: "246px",
68996
69011
  maxApps: 8,
68997
69012
  searchApp: [],
68998
- tabActiveKeys: {}
69013
+ tabActiveKeys: {},
69014
+ firstTabInitialized: false
68999
69015
  };
69000
69016
  },
69001
69017
  watch: {
@@ -69069,8 +69085,33 @@ const __vue2_script$2 = {
69069
69085
  var _a2;
69070
69086
  this.offsetTop = ((_a2 = this.$refs.myapp) == null ? void 0 : _a2.clientHeight) + 58 || 256;
69071
69087
  }, 100);
69088
+ this.$nextTick(() => {
69089
+ if (this.active === 0) {
69090
+ this.initFirstTab();
69091
+ }
69092
+ });
69093
+ },
69094
+ activated() {
69095
+ if (this.active === 0) {
69096
+ this.$nextTick(() => {
69097
+ this.resetFirstTab();
69098
+ });
69099
+ }
69072
69100
  },
69073
69101
  methods: {
69102
+ initFirstTab() {
69103
+ this.activeKey = 0;
69104
+ this.$set(this.tabActiveKeys, 0, 0);
69105
+ this.firstTabInitialized = true;
69106
+ },
69107
+ resetFirstTab() {
69108
+ this.activeKey = 0;
69109
+ this.$set(this.tabActiveKeys, 0, 0);
69110
+ const scrollContainer = this.$refs.scrollContainer;
69111
+ if (scrollContainer) {
69112
+ scrollContainer.scrollTop = 0;
69113
+ }
69114
+ },
69074
69115
  handleTabClick(index2) {
69075
69116
  if (this.active === index2)
69076
69117
  return;
@@ -69153,28 +69194,28 @@ const __vue2_script$2 = {
69153
69194
  handleRightScroll() {
69154
69195
  if (this.isScrollingProgrammatically)
69155
69196
  return;
69156
- const scrollContainer = Array.isArray(this.$refs.scrollContainer) ? this.$refs.scrollContainer[0] : this.$refs.scrollContainer;
69197
+ const scrollContainer = this.$refs.scrollContainer;
69157
69198
  if (!scrollContainer)
69158
69199
  return;
69200
+ const sections = scrollContainer.querySelectorAll(".ind-m-menu-section");
69201
+ if (sections.length === 0)
69202
+ return;
69159
69203
  const scrollTop = scrollContainer.scrollTop;
69160
69204
  const containerHeight = scrollContainer.clientHeight;
69161
69205
  const triggerPosition = containerHeight * 0.3;
69162
- const sections = Array.from(scrollContainer.querySelectorAll(".menu-section"));
69163
- if (sections.length === 0)
69164
- return;
69165
- let activeIndex = 0;
69166
- let minDistance = Infinity;
69167
- sections.forEach((section, index2) => {
69206
+ let activeIndex = this.activeKey;
69207
+ for (let i = 0; i < sections.length; i++) {
69208
+ const section = sections[i];
69168
69209
  const sectionTop = section.offsetTop - scrollContainer.offsetTop;
69169
69210
  const sectionBottom = sectionTop + section.offsetHeight;
69170
- const distance = Math.abs((sectionTop + sectionBottom) / 2 - (scrollTop + triggerPosition));
69171
- if (distance < minDistance) {
69172
- minDistance = distance;
69173
- activeIndex = index2;
69211
+ if (sectionTop <= scrollTop + triggerPosition && sectionBottom >= scrollTop + triggerPosition) {
69212
+ activeIndex = i;
69213
+ break;
69174
69214
  }
69175
- });
69215
+ }
69176
69216
  if (this.activeKey !== activeIndex) {
69177
69217
  this.activeKey = activeIndex;
69218
+ this.$set(this.tabActiveKeys, this.active, activeIndex);
69178
69219
  }
69179
69220
  },
69180
69221
  routeTo(app2) {
@@ -69250,10 +69291,6 @@ const __vue2_script$2 = {
69250
69291
  }
69251
69292
  },
69252
69293
  addToMyApps: _.debounce(function(menu) {
69253
- if (this.tempMyApps.length == this.maxApps) {
69254
- Toast("\u9996\u9875\u6700\u591A\u6DFB\u52A0" + this.maxApps + "\u4E2A\u5E94\u7528!");
69255
- return;
69256
- }
69257
69294
  if (this.tempMyApps.find((v) => v.meta.permissionId === menu.meta.permissionId)) {
69258
69295
  console.log("\u5E94\u7528\u5DF2\u5B58\u5728");
69259
69296
  return;
@@ -69289,6 +69326,17 @@ const __vue2_script$2 = {
69289
69326
  saveMyApps() {
69290
69327
  this.$store.commit("setMyAppsList", this.my_apps);
69291
69328
  }
69329
+ },
69330
+ computed: {
69331
+ paginatedApps() {
69332
+ const apps = this.isEditing ? this.tempMyApps : this.my_apps;
69333
+ const pageSize = 8;
69334
+ const pages2 = [];
69335
+ for (let i = 0; i < apps.length; i += pageSize) {
69336
+ pages2.push(apps.slice(i, i + pageSize));
69337
+ }
69338
+ return pages2;
69339
+ }
69292
69340
  }
69293
69341
  };
69294
69342
  const __cssModules$2 = {};