@indfnd/common-mobile 0.0.105 → 0.0.106

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.106](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.105...v0.0.106) (2025-10-15)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修改 ([ca53302](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/ca53302ebffecb734e4055fc3e7bd2442a6836f3))
11
+
5
12
  ### [0.0.105](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.104...v0.0.105) (2025-10-15)
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.104";
5
+ const version$2 = "0.0.105";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -69123,10 +69123,12 @@ const __vue2_script$2 = {
69123
69123
  return;
69124
69124
  const sections = Array.from(container.querySelectorAll(".ind-m-menu-section"));
69125
69125
  this.sectionPositions = sections.map((section) => {
69126
+ const rect = section.getBoundingClientRect();
69127
+ const containerRect = container.getBoundingClientRect();
69126
69128
  return {
69127
69129
  id: section.id,
69128
- top: section.offsetTop,
69129
- bottom: section.offsetTop + section.offsetHeight
69130
+ top: rect.top - containerRect.top + container.scrollTop,
69131
+ bottom: rect.bottom - containerRect.top + container.scrollTop
69130
69132
  };
69131
69133
  });
69132
69134
  });
@@ -69161,12 +69163,11 @@ const __vue2_script$2 = {
69161
69163
  this.tabActiveKeys[this.active] = this.activeKey;
69162
69164
  return;
69163
69165
  }
69164
- const viewportMiddle = scrollTop + containerHeight / 2;
69166
+ const viewportTop = scrollTop + 60;
69165
69167
  let activeIndex = 0;
69166
69168
  let minDistance = Infinity;
69167
69169
  this.sectionPositions.forEach((section, index2) => {
69168
- const sectionMiddle = (section.top + section.bottom) / 2;
69169
- const distance = Math.abs(sectionMiddle - viewportMiddle);
69170
+ const distance = Math.abs(section.top - viewportTop);
69170
69171
  if (distance < minDistance) {
69171
69172
  minDistance = distance;
69172
69173
  activeIndex = index2;
@@ -69185,12 +69186,14 @@ const __vue2_script$2 = {
69185
69186
  this.tabActiveKeys[this.active] = index2;
69186
69187
  this.$nextTick(() => {
69187
69188
  const container = this.getScrollContainer();
69188
- const targetPosition = this.sectionPositions.find(
69189
- (pos) => pos.id === `section-${this.active}-${index2}`
69190
- );
69191
- if (container && targetPosition) {
69189
+ const targetSection = container.querySelector(`#section-${this.active}-${index2}`);
69190
+ if (container && targetSection) {
69191
+ const containerRect = container.getBoundingClientRect();
69192
+ const sectionRect = targetSection.getBoundingClientRect();
69193
+ const scrollPosition = sectionRect.top - containerRect.top + container.scrollTop;
69194
+ const offset3 = 20;
69192
69195
  container.scrollTo({
69193
- top: targetPosition.top,
69196
+ top: scrollPosition - offset3,
69194
69197
  behavior: "smooth"
69195
69198
  });
69196
69199
  }