@indfnd/common-mobile 0.0.102 → 0.0.103

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,13 @@
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.103](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.102...v0.0.103) (2025-10-15)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修改 ([b621c2f](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/b621c2fef76a60c4c306714364cbc73263ea17f9))
11
+
5
12
  ### [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
13
 
7
14
 
@@ -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.101";
5
+ const version$2 = "0.0.102";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -69010,8 +69010,7 @@ const __vue2_script$2 = {
69010
69010
  offsetTop: "246px",
69011
69011
  maxApps: 8,
69012
69012
  searchApp: [],
69013
- tabActiveKeys: {},
69014
- firstTabInitialized: false
69013
+ tabActiveKeys: {}
69015
69014
  };
69016
69015
  },
69017
69016
  watch: {
@@ -69085,33 +69084,8 @@ const __vue2_script$2 = {
69085
69084
  var _a2;
69086
69085
  this.offsetTop = ((_a2 = this.$refs.myapp) == null ? void 0 : _a2.clientHeight) + 58 || 256;
69087
69086
  }, 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
- }
69100
69087
  },
69101
69088
  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
- },
69115
69089
  handleTabClick(index2) {
69116
69090
  if (this.active === index2)
69117
69091
  return;
@@ -69194,28 +69168,28 @@ const __vue2_script$2 = {
69194
69168
  handleRightScroll() {
69195
69169
  if (this.isScrollingProgrammatically)
69196
69170
  return;
69197
- const scrollContainer = this.$refs.scrollContainer;
69171
+ const scrollContainer = Array.isArray(this.$refs.scrollContainer) ? this.$refs.scrollContainer[0] : this.$refs.scrollContainer;
69198
69172
  if (!scrollContainer)
69199
69173
  return;
69200
- const sections = scrollContainer.querySelectorAll(".ind-m-menu-section");
69201
- if (sections.length === 0)
69202
- return;
69203
69174
  const scrollTop = scrollContainer.scrollTop;
69204
69175
  const containerHeight = scrollContainer.clientHeight;
69205
69176
  const triggerPosition = containerHeight * 0.3;
69206
- let activeIndex = this.activeKey;
69207
- for (let i = 0; i < sections.length; i++) {
69208
- const section = sections[i];
69177
+ const sections = Array.from(scrollContainer.querySelectorAll(".ind-m-menu-section"));
69178
+ if (sections.length === 0)
69179
+ return;
69180
+ let activeIndex = 0;
69181
+ let minDistance = Infinity;
69182
+ sections.forEach((section, index2) => {
69209
69183
  const sectionTop = section.offsetTop - scrollContainer.offsetTop;
69210
69184
  const sectionBottom = sectionTop + section.offsetHeight;
69211
- if (sectionTop <= scrollTop + triggerPosition && sectionBottom >= scrollTop + triggerPosition) {
69212
- activeIndex = i;
69213
- break;
69185
+ const distance = Math.abs((sectionTop + sectionBottom) / 2 - (scrollTop + triggerPosition));
69186
+ if (distance < minDistance) {
69187
+ minDistance = distance;
69188
+ activeIndex = index2;
69214
69189
  }
69215
- }
69190
+ });
69216
69191
  if (this.activeKey !== activeIndex) {
69217
69192
  this.activeKey = activeIndex;
69218
- this.$set(this.tabActiveKeys, this.active, activeIndex);
69219
69193
  }
69220
69194
  },
69221
69195
  routeTo(app2) {