@tarojs/components-advanced 4.1.12-beta.35 → 4.1.12-beta.37

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.
@@ -64,10 +64,17 @@ interface UseRefresherReturn {
64
64
  };
65
65
  addImperativeTouchListeners?: (el: HTMLElement) => () => void;
66
66
  renderRefresherContent: () => React.ReactNode | null;
67
+ /**
68
+ * 刷新区几何高度:H5 等非小程序原生路径下与 List 绝对层 height / translateY 及本 hook 内下拉收尾动画一致。
69
+ * 小程序原生 refresher 由 ScrollView 负责展示与布局,List 侧槽位样式不依赖此字段。
70
+ */
71
+ slotHeight: number;
67
72
  }
68
73
  export declare function useRefresher(config: ListRefresherConfig | null,
69
74
  /** 列表逻辑顶部对应的 scrollTop,用于触顶判断;H5「顶栏悬浮+只滚列表」时传 0,imperative 内以 DOM scrollTop 为准 */
70
75
  scrollTopAtLogicalTop: number,
71
76
  /** scrollElement 模式下可选:下拉起始点须在 List 内才触发刷新;未传时默认 true(沿用原逻辑) */
72
- getIsTouchInListArea?: (ev: TouchEvent) => boolean): UseRefresherReturn;
77
+ getIsTouchInListArea?: (ev: TouchEvent) => boolean,
78
+ /** H5 等:开启刷新区时是否测量自定义内容高度(与 List 侧 isH5 && refresher 一致) */
79
+ enableH5SlotMeasure?: boolean): UseRefresherReturn;
73
80
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Slot, View } from '@tarojs/components';
3
- import React, { useState, useRef, useCallback } from 'react';
3
+ import React, { useState, useRef, useCallback, useMemo, useLayoutEffect } from 'react';
4
4
  import { supportsNativeRefresher } from '../utils.js';
5
5
 
6
6
  /**
@@ -20,6 +20,18 @@ const H5_DAMPING_LIMIT_VH = 0.8;
20
20
  const VIEWPORT_HEIGHT_FALLBACK = 800;
21
21
  const DEG_LIMIT = 40;
22
22
  const DEFAULT_REFRESHER_HEIGHT = 50;
23
+ function resolveTaroMeasureElement(ref) {
24
+ var _a;
25
+ const n = ref.current;
26
+ if (!n)
27
+ return null;
28
+ if (typeof Element !== 'undefined' && n instanceof Element)
29
+ return n;
30
+ const el = (_a = n.$el) !== null && _a !== void 0 ? _a : n;
31
+ if (el && typeof Element !== 'undefined' && el instanceof Element)
32
+ return el;
33
+ return null;
34
+ }
23
35
  function nowMs() {
24
36
  if (typeof performance !== 'undefined' && typeof performance.now === 'function') {
25
37
  return performance.now();
@@ -45,7 +57,9 @@ function useRefresher(config,
45
57
  /** 列表逻辑顶部对应的 scrollTop,用于触顶判断;H5「顶栏悬浮+只滚列表」时传 0,imperative 内以 DOM scrollTop 为准 */
46
58
  scrollTopAtLogicalTop,
47
59
  /** scrollElement 模式下可选:下拉起始点须在 List 内才触发刷新;未传时默认 true(沿用原逻辑) */
48
- getIsTouchInListArea) {
60
+ getIsTouchInListArea,
61
+ /** H5 等:开启刷新区时是否测量自定义内容高度(与 List 侧 isH5 && refresher 一致) */
62
+ enableH5SlotMeasure) {
49
63
  var _a, _b, _c, _d, _e, _f, _g;
50
64
  const [internalRefreshing, setInternalRefreshing] = useState(false);
51
65
  const [pullDistance, setPullDistance] = useState(0);
@@ -87,6 +101,50 @@ getIsTouchInListArea) {
87
101
  topThresholdPxRef.current = topThresholdPx;
88
102
  const getIsTouchInListAreaRef = useRef(getIsTouchInListArea);
89
103
  getIsTouchInListAreaRef.current = getIsTouchInListArea;
104
+ const [measuredSlotHeight, setMeasuredSlotHeight] = useState(0);
105
+ const h5MeasureRef = useRef(null);
106
+ const setH5MeasureRef = useCallback((el) => {
107
+ h5MeasureRef.current = el;
108
+ }, []);
109
+ const hasCustomRefresherChildren = (config === null || config === void 0 ? void 0 : config.children) != null;
110
+ const slotHeight = useMemo(() => {
111
+ if (!config || config.refresherEnabled === false)
112
+ return DEFAULT_REFRESHER_HEIGHT;
113
+ if (!hasCustomRefresherChildren)
114
+ return DEFAULT_REFRESHER_HEIGHT;
115
+ if (supportsNativeRefresher)
116
+ return DEFAULT_REFRESHER_HEIGHT;
117
+ if (!enableH5SlotMeasure)
118
+ return DEFAULT_REFRESHER_HEIGHT;
119
+ return measuredSlotHeight > 0 ? measuredSlotHeight : DEFAULT_REFRESHER_HEIGHT;
120
+ }, [
121
+ config,
122
+ hasCustomRefresherChildren,
123
+ measuredSlotHeight,
124
+ enableH5SlotMeasure,
125
+ ]);
126
+ const slotHeightRef = useRef(slotHeight);
127
+ slotHeightRef.current = slotHeight;
128
+ useLayoutEffect(() => {
129
+ if (!enableH5SlotMeasure) {
130
+ setMeasuredSlotHeight(0);
131
+ return;
132
+ }
133
+ if (!hasCustomRefresherChildren)
134
+ return;
135
+ const node = resolveTaroMeasureElement(h5MeasureRef);
136
+ if (!node || typeof ResizeObserver === 'undefined')
137
+ return;
138
+ const ro = new ResizeObserver((entries) => {
139
+ const entry = entries[0];
140
+ if (!entry)
141
+ return;
142
+ const h = Math.max(1, Math.ceil(entry.contentRect.height));
143
+ setMeasuredSlotHeight(prev => (prev === h ? prev : h));
144
+ });
145
+ ro.observe(node);
146
+ return () => ro.disconnect();
147
+ }, [enableH5SlotMeasure, hasCustomRefresherChildren, config === null || config === void 0 ? void 0 : config.children]);
90
148
  const scrollViewRefresherProps = config && supportsNativeRefresher ? {
91
149
  refresherEnabled: (_d = config.refresherEnabled) !== null && _d !== void 0 ? _d : true,
92
150
  refresherThreshold: (_e = config.refresherThreshold) !== null && _e !== void 0 ? _e : 45,
@@ -316,7 +374,7 @@ getIsTouchInListArea) {
316
374
  return;
317
375
  refreshingLockRef.current = true;
318
376
  const pullValue = lastPull;
319
- const height = DEFAULT_REFRESHER_HEIGHT;
377
+ const height = slotHeightRef.current;
320
378
  pullAtReleaseRef.current = pullValue;
321
379
  if (!isControlledRef.current)
322
380
  setInternalRefreshingRef.current(true);
@@ -339,8 +397,9 @@ getIsTouchInListArea) {
339
397
  .then(() => {
340
398
  if (!refreshingLockRef.current)
341
399
  return;
342
- emitStatusChangeRef.current(3 /* RefreshStatus.Completed */, DEFAULT_REFRESHER_HEIGHT);
343
- requestAnimationFrame(() => runBounceBack(DEFAULT_REFRESHER_HEIGHT, () => {
400
+ const slotH = slotHeightRef.current;
401
+ emitStatusChangeRef.current(3 /* RefreshStatus.Completed */, slotH);
402
+ requestAnimationFrame(() => runBounceBack(slotH, () => {
344
403
  var _a, _b;
345
404
  refreshingLockRef.current = false;
346
405
  lastPullRef.current = 0;
@@ -351,7 +410,7 @@ getIsTouchInListArea) {
351
410
  }));
352
411
  }, () => {
353
412
  emitStatusChangeRef.current(4 /* RefreshStatus.Failed */, pullValue);
354
- emitStatusChangeRef.current(3 /* RefreshStatus.Completed */, DEFAULT_REFRESHER_HEIGHT);
413
+ emitStatusChangeRef.current(3 /* RefreshStatus.Completed */, slotHeightRef.current);
355
414
  safeReset();
356
415
  });
357
416
  });
@@ -423,7 +482,7 @@ getIsTouchInListArea) {
423
482
  const defaultText = showDefaultText
424
483
  ? (isRefreshing ? '加载中...' : pullDistance >= threshold ? '释放刷新' : '下拉刷新')
425
484
  : null;
426
- return (jsx(View, { style: {
485
+ return (jsx(View, { ref: !supportsNativeRefresher && hasCustomChildren ? setH5MeasureRef : undefined, style: {
427
486
  width: '100%',
428
487
  minHeight: hasCustomChildren ? undefined : DEFAULT_REFRESHER_HEIGHT,
429
488
  height: hasCustomChildren ? 'auto' : DEFAULT_REFRESHER_HEIGHT,
@@ -433,17 +492,18 @@ getIsTouchInListArea) {
433
492
  alignItems: 'center',
434
493
  background,
435
494
  }, children: hasCustomChildren ? config.children : (defaultText ? jsx(View, { style: textColor ? { color: textColor } : undefined, children: defaultText }) : null) }));
436
- }, [config, pullDistance, isRefreshing]);
495
+ }, [config, pullDistance, isRefreshing, setH5MeasureRef]);
437
496
  /** 受控 refresherTriggered=true:无下拉也显示加载条 */
438
497
  React.useEffect(() => {
439
498
  if (!isControlled || !config || config.refresherTriggered !== true)
440
499
  return;
441
- if (pullDistanceRef.current >= DEFAULT_REFRESHER_HEIGHT)
500
+ const h = slotHeightRef.current;
501
+ if (pullDistanceRef.current >= h)
442
502
  return;
443
- setPullDistanceRef.current(DEFAULT_REFRESHER_HEIGHT);
444
- pullDistanceRef.current = DEFAULT_REFRESHER_HEIGHT;
445
- emitStatusChangeRef.current(2 /* RefreshStatus.Refreshing */, DEFAULT_REFRESHER_HEIGHT);
446
- }, [isControlled, config === null || config === void 0 ? void 0 : config.refresherTriggered]);
503
+ setPullDistanceRef.current(h);
504
+ pullDistanceRef.current = h;
505
+ emitStatusChangeRef.current(2 /* RefreshStatus.Refreshing */, h);
506
+ }, [isControlled, config === null || config === void 0 ? void 0 : config.refresherTriggered, slotHeight]);
447
507
  /** 受控 refresherTriggered=false:回弹清零;与 touch 共用 rafRef,cancel 时须在此释放 refreshingLockRef */
448
508
  const prevTriggeredRef = useRef(config === null || config === void 0 ? void 0 : config.refresherTriggered);
449
509
  React.useEffect(() => {
@@ -456,7 +516,7 @@ getIsTouchInListArea) {
456
516
  if (prev === true && (pullDistanceRef.current > 0 || isRefreshingRef.current)) {
457
517
  if (rafRef.current != null)
458
518
  cancelAnimationFrame(rafRef.current);
459
- const from = pullDistanceRef.current > 0 ? pullDistanceRef.current : DEFAULT_REFRESHER_HEIGHT;
519
+ const from = pullDistanceRef.current > 0 ? pullDistanceRef.current : slotHeightRef.current;
460
520
  emitStatusChangeRef.current(3 /* RefreshStatus.Completed */, from);
461
521
  const startTime = nowMs();
462
522
  const animate = () => {
@@ -481,7 +541,7 @@ getIsTouchInListArea) {
481
541
  };
482
542
  rafRef.current = requestAnimationFrame(animate);
483
543
  }
484
- }, [isControlled, config === null || config === void 0 ? void 0 : config.refresherTriggered]);
544
+ }, [isControlled, config === null || config === void 0 ? void 0 : config.refresherTriggered, slotHeight]);
485
545
  return {
486
546
  scrollViewRefresherProps,
487
547
  scrollViewRefresherHandlers,
@@ -493,6 +553,7 @@ getIsTouchInListArea) {
493
553
  },
494
554
  addImperativeTouchListeners: !supportsNativeRefresher && config && h5RefresherEnabled ? addImperativeTouchListeners : undefined,
495
555
  renderRefresherContent,
556
+ slotHeight,
496
557
  };
497
558
  }
498
559
 
@@ -1 +1 @@
1
- {"version":3,"file":"useRefresher.js","sources":["../../../../src/components/list/hooks/useRefresher.tsx"],"sourcesContent":["import { Slot, View } from '@tarojs/components'\nimport React, { useCallback, useRef, useState } from 'react'\n\nimport { supportsNativeRefresher } from '../utils'\n\n/**\n * List 组件内部的 refresher 配置类型(独立于 Refresher 组件)\n * 与 ScrollView refresher 相关属性语义对齐\n */\nexport interface ListRefresherConfig {\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: 'black' | 'white' | 'none'\n refresherBackground?: string\n refresherTriggered?: boolean\n /** 自定义刷新内容(来自 Refresher 子组件的 children) */\n children?: React.ReactNode\n onRefresherPulling?: (e?: { detail?: { deltaY?: number } }) => void\n onRefresherRefresh?: () => void | Promise<void>\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n onRefresherWillRefresh?: () => void\n onRefresherStatusChange?: (e?: { detail?: { status?: number, dy?: number } }) => void\n}\n\n/**\n * 下拉刷新(List 内部)\n *\n * - 小程序:ScrollView 原生 refresher-*;业务 Promise reject 时补发 Failed(4)(原生不派发)\n * - H5:触顶 + touch 拖拽;最大行程 / 阻尼停拉线为视口高的 0.9 / 0.8(innerHeight);收尾仅依赖 onRefresherRefresh 的 Promise\n * - 动画时间戳用 nowMs():小程序部分环境无 performance,避免抛错中断回弹\n * - rafRef 与受控 refresherTriggered→false 的 effect 共用:effect 内 cancel 可能打断 H5 成功回弹,须在 effect 动画结束处释放 refreshingLockRef\n * - H5 reject:onRefresherStatusChange 顺序 Failed(4) → Completed(3) → Idle(0)\n * - emitStatusChange:仅 status 变化时回调(同 status 不重复)\n */\n\nconst BOUNCE_MS = 300\nconst AT_TOP_THRESHOLD = 3\nconst H5_PULL_DISTANCE_MAX_VH = 0.9\nconst H5_DAMPING_LIMIT_VH = 0.8\nconst VIEWPORT_HEIGHT_FALLBACK = 800\nconst DEG_LIMIT = 40\nexport const DEFAULT_REFRESHER_HEIGHT = 50\n\nfunction nowMs (): number {\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n return performance.now()\n }\n return Date.now()\n}\n\n/** 下拉刷新状态枚举(对齐微信小程序 RefreshStatus) */\nexport const enum RefreshStatus {\n /** 空闲 */\n Idle = 0,\n /** 超过下拉刷新阈值 */\n CanRefresh = 1,\n /** 刷新中 */\n Refreshing = 2,\n /** 刷新完成 */\n Completed = 3,\n /** 刷新失败 */\n Failed = 4,\n}\n\nfunction getViewportHeightPx (): number {\n if (typeof window === 'undefined' || !Number.isFinite(window.innerHeight) || window.innerHeight <= 0) {\n return VIEWPORT_HEIGHT_FALLBACK\n }\n return window.innerHeight\n}\n\n/** 阻尼增量:ratio=总下拉位移/视口高;超过 dampingLimit 后不再累加 */\nfunction dampIncrement (\n diff: number,\n totalMove: number,\n currentPull: number,\n viewportHeight: number,\n dampingLimit: number\n): number {\n if (diff <= 0) return 0\n if (currentPull >= dampingLimit) return 0\n const ratio = Math.min(totalMove / viewportHeight, 1)\n return diff * (1 - ratio) * 0.6\n}\n\ninterface UseRefresherReturn {\n scrollViewRefresherProps: {\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: string\n refresherBackground?: string\n refresherTriggered?: boolean\n }\n scrollViewRefresherHandlers: {\n onRefresherPulling?: (e: any) => void\n onRefresherRefresh?: (e: any) => void\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n }\n h5RefresherProps: {\n touchHandlers: Record<string, unknown>\n pullDistance: number\n isRefreshing: boolean\n /** H5 单结构下恒为 true,仅兼容旧类型 */\n showRefresherLayer: boolean\n }\n addImperativeTouchListeners?: (el: HTMLElement) => () => void\n renderRefresherContent: () => React.ReactNode | null\n}\n\nexport function useRefresher(\n config: ListRefresherConfig | null,\n /** 列表逻辑顶部对应的 scrollTop,用于触顶判断;H5「顶栏悬浮+只滚列表」时传 0,imperative 内以 DOM scrollTop 为准 */\n scrollTopAtLogicalTop: number,\n /** scrollElement 模式下可选:下拉起始点须在 List 内才触发刷新;未传时默认 true(沿用原逻辑) */\n getIsTouchInListArea?: (ev: TouchEvent) => boolean\n): UseRefresherReturn {\n const [internalRefreshing, setInternalRefreshing] = useState(false)\n const [pullDistance, setPullDistance] = useState(0)\n const pullDistanceRef = useRef(0)\n const rafRef = useRef<number | null>(null)\n const setPullDistanceRef = useRef(setPullDistance)\n const setInternalRefreshingRef = useRef(setInternalRefreshing)\n setPullDistanceRef.current = setPullDistance\n setInternalRefreshingRef.current = setInternalRefreshing\n pullDistanceRef.current = pullDistance\n\n const isControlled = typeof config?.refresherTriggered === 'boolean'\n const isRefreshing = isControlled ? (config?.refresherTriggered ?? false) : internalRefreshing\n const isRefreshingRef = useRef(isRefreshing)\n isRefreshingRef.current = isRefreshing\n /** 刷新中锁:runRefresh 内同步置 true,避免 setState 未重渲染前再次触摸触发刷新 */\n const refreshingLockRef = useRef(false)\n /** H5 当前刷新状态,用于 onRefresherStatusChange 避免重复触发 */\n const refreshStatusRef = useRef<RefreshStatus>(RefreshStatus.Idle)\n /** H5 是否启用下拉刷新:refresherEnabled === false 时不挂 touch、不显示顶栏 */\n const h5RefresherEnabled = !!config && config.refresherEnabled !== false\n\n /** touch 只挂一次,回调里读 ref 才能拿到最新配置,避免改预设后仍用旧值 */\n const thresholdRef = useRef(config?.refresherThreshold ?? 45)\n thresholdRef.current = config?.refresherThreshold ?? 45\n const configRef = useRef(config)\n configRef.current = config\n\n const emitStatusChangeRef = useRef((status: RefreshStatus, dy: number) => {\n if (refreshStatusRef.current !== status) {\n refreshStatusRef.current = status\n configRef.current?.onRefresherStatusChange?.({ detail: { status, dy } })\n }\n })\n const isControlledRef = useRef(isControlled)\n isControlledRef.current = isControlled\n /** H5 顶栏悬浮时 List 传 0,触顶即 scrollTop<=0+阈值;否则由 List 传列表顶对应的 scrollTop */\n const scrollTopWhenAtTop = !supportsNativeRefresher && config ? scrollTopAtLogicalTop : 0\n const topThresholdPx = scrollTopWhenAtTop + AT_TOP_THRESHOLD\n const topThresholdPxRef = useRef(topThresholdPx)\n topThresholdPxRef.current = topThresholdPx\n\n const getIsTouchInListAreaRef = useRef(getIsTouchInListArea)\n getIsTouchInListAreaRef.current = getIsTouchInListArea\n\n const scrollViewRefresherProps = config && supportsNativeRefresher ? {\n refresherEnabled: config.refresherEnabled ?? true,\n refresherThreshold: config.refresherThreshold ?? 45,\n refresherDefaultStyle: config.refresherDefaultStyle ?? 'black',\n refresherBackground: config.refresherBackground ?? '#fff',\n refresherTriggered: isRefreshing,\n } : {}\n\n const scrollViewRefresherHandlers = config && supportsNativeRefresher ? {\n onRefresherPulling: (e: any) => {\n config.onRefresherPulling?.({ detail: { deltaY: e.detail?.deltaY ?? 0 } })\n },\n onRefresherRefresh: async () => {\n if (!isControlled) setInternalRefreshing(true)\n try {\n await config.onRefresherRefresh?.()\n } catch {\n // 原生不派发 Failed(4),补发便于与 H5 一致\n config.onRefresherStatusChange?.({ detail: { status: RefreshStatus.Failed, dy: 0 } })\n } finally {\n if (!isControlled) setInternalRefreshing(false)\n }\n },\n onRefresherRestore: () => config.onRefresherRestore?.(),\n onRefresherAbort: () => config.onRefresherAbort?.(),\n // 小程序特有事件:即将触发刷新(拖动超过 threshold 时)\n onRefresherWillRefresh: () => config.onRefresherWillRefresh?.(),\n // 小程序特有事件:下拉刷新状态变化\n onRefresherStatusChange: (e: any) => {\n config.onRefresherStatusChange?.({ detail: { status: e.detail?.status, dy: e.detail?.dy } })\n },\n } : {}\n\n const addImperativeTouchListeners = React.useCallback((el: HTMLElement) => {\n if (supportsNativeRefresher || !configRef.current || !h5RefresherEnabled) return () => {}\n const scrollEl = el as HTMLDivElement\n const startY = { current: 0 }\n const startX = { current: 0 }\n const lastY = { current: 0 }\n let touchStartedAtTop = false\n /** 下拉起始点是否在 List 内(scrollElement 模式);未传 getIsTouchInListArea 时恒为 true */\n let touchStartedInListArea = true\n let dragOnEdge = false\n let lastPull = 0\n /** 用于 onTouchEnd 判断是否触发刷新;刷新完成后必须置 0,否则下次点击(无 touchMove)会误用上次的 lastPull 再次触发 */\n const lastPullRef = { current: 0 }\n const pullAtReleaseRef = { current: 0 }\n\n const setPull = (v: number) => {\n lastPull = v\n lastPullRef.current = v\n setPullDistanceRef.current(v)\n }\n\n const runBounceBack = (fromValue: number, onComplete?: () => void) => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n const v = fromValue * (1 - ease)\n setPullDistanceRef.current(v)\n lastPullRef.current = v\n lastPull = v\n if (t < 1) {\n rafRef.current = requestAnimationFrame(animate)\n } else {\n setPullDistanceRef.current(0)\n if (!isControlledRef.current) setInternalRefreshingRef.current(false)\n rafRef.current = null\n onComplete?.()\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n\n /** 未达阈值松手回弹结束:通知中止 */\n const runBounceBackAbort = (fromValue: number) => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n const v = fromValue * (1 - ease)\n setPullDistanceRef.current(v)\n lastPullRef.current = v\n lastPull = v\n if (t < 1) rafRef.current = requestAnimationFrame(animate)\n else {\n setPullDistanceRef.current(0)\n rafRef.current = null\n lastPullRef.current = 0\n lastPull = 0\n configRef.current?.onRefresherAbort?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n\n /** 收起到加载高度后再执行 onRefresherRefresh */\n const runBounceToLoading = (fromValue: number, toValue: number, onReach: () => void) => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n setPullDistanceRef.current(fromValue + (toValue - fromValue) * ease)\n if (t < 1) {\n rafRef.current = requestAnimationFrame(animate)\n } else {\n setPullDistanceRef.current(toValue)\n rafRef.current = null\n onReach()\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n\n const isEdge = () => (scrollEl.scrollTop ?? 0) <= topThresholdPxRef.current\n\n const onTouchStart = (e: TouchEvent) => {\n if (refreshingLockRef.current || isRefreshingRef.current) return\n if (rafRef.current != null) {\n cancelAnimationFrame(rafRef.current)\n rafRef.current = null\n }\n lastPull = lastPullRef.current\n touchStartedAtTop = isEdge()\n touchStartedInListArea = getIsTouchInListAreaRef.current?.(e) ?? true\n const t0 = e.touches[0]\n if (t0) {\n startY.current = t0.clientY\n startX.current = t0.clientX\n lastY.current = t0.clientY\n }\n }\n\n const onTouchMove = (ev: TouchEvent) => {\n if (refreshingLockRef.current || isRefreshingRef.current) return\n if (!touchStartedInListArea) return\n const touch = ev.touches[0]\n if (!touch) return\n const currentY = touch.clientY\n const currentX = touch.clientX\n if (!isEdge()) {\n setPull(0)\n dragOnEdge = false\n return\n }\n // 到顶后:若 touch 开始时不在顶部,在首次下拉(dy>0)时「采纳」该手势,使同一手势内滚到顶后继续下拉可触发刷新\n if (!touchStartedAtTop && !dragOnEdge) {\n const dyCheck = currentY - lastY.current\n if (dyCheck <= 0) return\n touchStartedAtTop = true\n // 重置起点,避免采纳时 dy 过大导致刷新层瞬间拉满\n startY.current = currentY\n startX.current = currentX\n lastY.current = currentY\n }\n\n const dy = currentY - lastY.current\n // 还没进入下拉拖拽阶段(dragOnEdge=false)时,先看第一下是往上还是往下:\n // - 第一笔就是往上滑(dy<=0):视为正常滚动,直接交给原生 Scroll,不拦截、不启动下拉逻辑\n // - 第一笔是往下滑(dy>0):才认为是一次「下拉刷新」手势,进入拖拽模式\n if (!dragOnEdge) {\n if (dy <= 0) {\n lastY.current = currentY\n startY.current = currentY\n startX.current = currentX\n return\n }\n // 真正开始下拉刷新\n dragOnEdge = true\n startY.current = currentY\n startX.current = currentX\n }\n\n if (ev.cancelable) ev.preventDefault()\n const totalMove = currentY - startY.current\n const dx = currentX - startX.current\n if (dy <= 0) {\n lastY.current = currentY\n const next = Math.max(0, lastPull + dy)\n setPull(next)\n return\n }\n const deg = Math.atan(Math.abs(dx) / dy) * (180 / Math.PI)\n if (deg > DEG_LIMIT) {\n startY.current = currentY\n startX.current = currentX\n lastY.current = currentY\n return\n }\n lastY.current = currentY\n const vh = getViewportHeightPx()\n const maxPull = vh * H5_PULL_DISTANCE_MAX_VH\n const dampingLimit = vh * H5_DAMPING_LIMIT_VH\n const damped = dampIncrement(dy, totalMove, lastPull, vh, dampingLimit)\n const next = Math.min(lastPull + damped, maxPull)\n setPull(next)\n configRef.current?.onRefresherPulling?.({ detail: { deltaY: next } })\n if (next >= thresholdRef.current) {\n configRef.current?.onRefresherWillRefresh?.()\n emitStatusChangeRef.current(RefreshStatus.CanRefresh, next)\n } else {\n emitStatusChangeRef.current(RefreshStatus.Idle, next)\n }\n }\n\n const runRefresh = () => {\n const cfg = configRef.current\n if (!cfg || refreshingLockRef.current || isRefreshingRef.current) return\n refreshingLockRef.current = true\n const pullValue = lastPull\n const height = DEFAULT_REFRESHER_HEIGHT\n pullAtReleaseRef.current = pullValue\n if (!isControlledRef.current) setInternalRefreshingRef.current(true)\n emitStatusChangeRef.current(RefreshStatus.Refreshing, pullValue)\n runBounceToLoading(pullValue, height, () => {\n const safeReset = () => {\n setPullDistanceRef.current(0)\n if (!isControlledRef.current) setInternalRefreshingRef.current(false)\n refreshingLockRef.current = false\n lastPullRef.current = 0\n lastPull = 0\n pullAtReleaseRef.current = 0\n configRef.current?.onRefresherRestore?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n }\n Promise.resolve(configRef.current?.onRefresherRefresh?.())\n .then(\n () => {\n if (!refreshingLockRef.current) return\n emitStatusChangeRef.current(RefreshStatus.Completed, DEFAULT_REFRESHER_HEIGHT)\n requestAnimationFrame(() =>\n runBounceBack(DEFAULT_REFRESHER_HEIGHT, () => {\n refreshingLockRef.current = false\n lastPullRef.current = 0\n lastPull = 0\n pullAtReleaseRef.current = 0\n configRef.current?.onRefresherRestore?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n })\n )\n },\n () => {\n emitStatusChangeRef.current(RefreshStatus.Failed, pullValue)\n emitStatusChangeRef.current(RefreshStatus.Completed, DEFAULT_REFRESHER_HEIGHT)\n safeReset()\n }\n )\n })\n }\n\n const onTouchEnd = () => {\n if (refreshingLockRef.current) return\n if (!touchStartedInListArea) return\n dragOnEdge = false\n const current = lastPullRef.current\n if (current >= thresholdRef.current) {\n runRefresh()\n } else {\n if (current > 0) {\n runBounceBackAbort(current)\n }\n }\n }\n\n const optsMove = { passive: false, capture: true }\n const optsEnd = { passive: true, capture: true }\n el.addEventListener('touchstart', onTouchStart, { passive: true })\n el.addEventListener('touchmove', onTouchMove, optsMove)\n el.addEventListener('touchend', onTouchEnd, optsEnd)\n el.addEventListener('touchcancel', onTouchEnd, optsEnd)\n return () => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n el.removeEventListener('touchstart', onTouchStart)\n el.removeEventListener('touchmove', onTouchMove, optsMove)\n el.removeEventListener('touchend', onTouchEnd, optsEnd)\n el.removeEventListener('touchcancel', onTouchEnd, optsEnd)\n }\n }, [h5RefresherEnabled])\n\n const renderRefresherContent = useCallback(() => {\n if (!config) return null\n const threshold = config.refresherThreshold ?? 45\n const defaultStyle = config.refresherDefaultStyle ?? 'black'\n const background = config.refresherBackground ?? '#fff'\n const hasCustomChildren = config.children != null\n\n // 小程序:自定义内容时返回 Slot(name=refresher),避免 View 的 slot 属性在模板层被过滤\n // 样式对齐 H5:由内层 View 统一承载容器样式\n if (supportsNativeRefresher) {\n // 小程序需要名为 refresher 的插槽来指定自定义刷新内容\n return hasCustomChildren && defaultStyle === 'none'\n ? (\n <Slot\n name=\"refresher\"\n style={{\n position: 'absolute',\n left: 0,\n right: 0,\n zIndex: 0,\n }}\n >\n <View\n style={{\n width: '100%',\n flexShrink: 0,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background,\n }}\n >\n {config.children}\n </View>\n </Slot>\n )\n : null\n }\n\n // H5:refresherDefaultStyle 控制默认指示器样式(对齐小程序 black/white/none)\n // black=深色文案 white=浅色文案 none=仅展示 children,不展示默认「下拉/释放/加载中」\n const textColor = defaultStyle === 'white' ? '#fff' : defaultStyle === 'black' ? '#333' : undefined\n // 有自定义 children 且 style=none 时隐藏默认文字\n const showDefaultText = !(defaultStyle === 'none' && hasCustomChildren)\n const defaultText = showDefaultText\n ? (isRefreshing ? '加载中...' : pullDistance >= threshold ? '释放刷新' : '下拉刷新')\n : null\n\n return (\n <View\n style={{\n width: '100%',\n minHeight: hasCustomChildren ? undefined : DEFAULT_REFRESHER_HEIGHT,\n height: hasCustomChildren ? 'auto' : DEFAULT_REFRESHER_HEIGHT,\n flexShrink: 0,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background,\n }}\n >\n {hasCustomChildren ? config.children : (\n defaultText ? <View style={textColor ? { color: textColor } : undefined}>{defaultText}</View> : null\n )}\n </View>\n )\n }, [config, pullDistance, isRefreshing])\n\n /** 受控 refresherTriggered=true:无下拉也显示加载条 */\n React.useEffect(() => {\n if (!isControlled || !config || config.refresherTriggered !== true) return\n if (pullDistanceRef.current >= DEFAULT_REFRESHER_HEIGHT) return\n setPullDistanceRef.current(DEFAULT_REFRESHER_HEIGHT)\n pullDistanceRef.current = DEFAULT_REFRESHER_HEIGHT\n emitStatusChangeRef.current(RefreshStatus.Refreshing, DEFAULT_REFRESHER_HEIGHT)\n }, [isControlled, config?.refresherTriggered])\n\n /** 受控 refresherTriggered=false:回弹清零;与 touch 共用 rafRef,cancel 时须在此释放 refreshingLockRef */\n const prevTriggeredRef = useRef(config?.refresherTriggered)\n React.useEffect(() => {\n if (!isControlled || !config || config.refresherTriggered !== false) {\n prevTriggeredRef.current = config?.refresherTriggered\n return\n }\n const prev = prevTriggeredRef.current\n prevTriggeredRef.current = false\n if (prev === true && (pullDistanceRef.current > 0 || isRefreshingRef.current)) {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const from = pullDistanceRef.current > 0 ? pullDistanceRef.current : DEFAULT_REFRESHER_HEIGHT\n emitStatusChangeRef.current(RefreshStatus.Completed, from)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n const v = from * (1 - ease)\n setPullDistanceRef.current(v)\n pullDistanceRef.current = v\n if (t < 1) rafRef.current = requestAnimationFrame(animate)\n else {\n setPullDistanceRef.current(0)\n pullDistanceRef.current = 0\n if (!isControlledRef.current) setInternalRefreshingRef.current(false)\n rafRef.current = null\n refreshingLockRef.current = false\n config.onRefresherRestore?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n }, [isControlled, config?.refresherTriggered])\n\n return {\n scrollViewRefresherProps,\n scrollViewRefresherHandlers,\n h5RefresherProps: {\n touchHandlers: {},\n pullDistance,\n isRefreshing,\n showRefresherLayer: !supportsNativeRefresher && !!config && h5RefresherEnabled,\n },\n addImperativeTouchListeners: !supportsNativeRefresher && config && h5RefresherEnabled ? addImperativeTouchListeners : undefined,\n renderRefresherContent,\n }\n}\n"],"names":["_jsx"],"mappings":";;;;;AAyBA;;;;;;;;;AASG;AAEH,MAAM,SAAS,GAAG,GAAG;AACrB,MAAM,gBAAgB,GAAG,CAAC;AAC1B,MAAM,uBAAuB,GAAG,GAAG;AACnC,MAAM,mBAAmB,GAAG,GAAG;AAC/B,MAAM,wBAAwB,GAAG,GAAG;AACpC,MAAM,SAAS,GAAG,EAAE;AACb,MAAM,wBAAwB,GAAG;AAExC,SAAS,KAAK,GAAA;AACZ,IAAA,IAAI,OAAO,WAAW,KAAK,WAAW,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU,EAAE;AAC/E,QAAA,OA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C,YAAY,EAAE,MAAM,KAAA,IAAA,IAAN,MAAM,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAN,MAAM,CAAE,kBAAkB,CAAC,CAAC;IAE9C,OAAO;QACL,wBAAwB;QACxB,2BAA2B;AAC3B,QAAA,gBAAgB,EAAE;AAChB,YAAA,aAAa,EAAE,EAAE;YACjB,YAAY;YACZ,YAAY;YACZ,kBAAkB,EAAE,CAAC,uBAAuB,IAAI,CAAC,CAAC,MAAM,IAAI,kBAAkB;AAC/E,SAAA;AACD,QAAA,2BAA2B,EAAE,CAAC,uBAAuB,IAAI,MAAM,IAAI,kBAAkB,GAAG,2BAA2B,GAAG,SAAS;QAC/H,sBAAsB;KACvB;AACH;;;;"}
1
+ {"version":3,"file":"useRefresher.js","sources":["../../../../src/components/list/hooks/useRefresher.tsx"],"sourcesContent":["import { Slot, View } from '@tarojs/components'\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport { supportsNativeRefresher } from '../utils'\n\n/**\n * List 组件内部的 refresher 配置类型(独立于 Refresher 组件)\n * 与 ScrollView refresher 相关属性语义对齐\n */\nexport interface ListRefresherConfig {\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: 'black' | 'white' | 'none'\n refresherBackground?: string\n refresherTriggered?: boolean\n /** 自定义刷新内容(来自 Refresher 子组件的 children) */\n children?: React.ReactNode\n onRefresherPulling?: (e?: { detail?: { deltaY?: number } }) => void\n onRefresherRefresh?: () => void | Promise<void>\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n onRefresherWillRefresh?: () => void\n onRefresherStatusChange?: (e?: { detail?: { status?: number, dy?: number } }) => void\n}\n\n/**\n * 下拉刷新(List 内部)\n *\n * - 小程序:ScrollView 原生 refresher-*;业务 Promise reject 时补发 Failed(4)(原生不派发)\n * - H5:触顶 + touch 拖拽;最大行程 / 阻尼停拉线为视口高的 0.9 / 0.8(innerHeight);收尾仅依赖 onRefresherRefresh 的 Promise\n * - 动画时间戳用 nowMs():小程序部分环境无 performance,避免抛错中断回弹\n * - rafRef 与受控 refresherTriggered→false 的 effect 共用:effect 内 cancel 可能打断 H5 成功回弹,须在 effect 动画结束处释放 refreshingLockRef\n * - H5 reject:onRefresherStatusChange 顺序 Failed(4) → Completed(3) → Idle(0)\n * - emitStatusChange:仅 status 变化时回调(同 status 不重复)\n */\n\nconst BOUNCE_MS = 300\nconst AT_TOP_THRESHOLD = 3\nconst H5_PULL_DISTANCE_MAX_VH = 0.9\nconst H5_DAMPING_LIMIT_VH = 0.8\nconst VIEWPORT_HEIGHT_FALLBACK = 800\nconst DEG_LIMIT = 40\nexport const DEFAULT_REFRESHER_HEIGHT = 50\n\nfunction resolveTaroMeasureElement (ref: React.RefObject<any>): HTMLElement | null {\n const n = ref.current\n if (!n) return null\n if (typeof Element !== 'undefined' && n instanceof Element) return n as HTMLElement\n const el = n.$el ?? n\n if (el && typeof Element !== 'undefined' && el instanceof Element) return el as HTMLElement\n return null\n}\n\nfunction nowMs (): number {\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n return performance.now()\n }\n return Date.now()\n}\n\n/** 下拉刷新状态枚举(对齐微信小程序 RefreshStatus) */\nexport const enum RefreshStatus {\n /** 空闲 */\n Idle = 0,\n /** 超过下拉刷新阈值 */\n CanRefresh = 1,\n /** 刷新中 */\n Refreshing = 2,\n /** 刷新完成 */\n Completed = 3,\n /** 刷新失败 */\n Failed = 4,\n}\n\nfunction getViewportHeightPx (): number {\n if (typeof window === 'undefined' || !Number.isFinite(window.innerHeight) || window.innerHeight <= 0) {\n return VIEWPORT_HEIGHT_FALLBACK\n }\n return window.innerHeight\n}\n\n/** 阻尼增量:ratio=总下拉位移/视口高;超过 dampingLimit 后不再累加 */\nfunction dampIncrement (\n diff: number,\n totalMove: number,\n currentPull: number,\n viewportHeight: number,\n dampingLimit: number\n): number {\n if (diff <= 0) return 0\n if (currentPull >= dampingLimit) return 0\n const ratio = Math.min(totalMove / viewportHeight, 1)\n return diff * (1 - ratio) * 0.6\n}\n\ninterface UseRefresherReturn {\n scrollViewRefresherProps: {\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: string\n refresherBackground?: string\n refresherTriggered?: boolean\n }\n scrollViewRefresherHandlers: {\n onRefresherPulling?: (e: any) => void\n onRefresherRefresh?: (e: any) => void\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n }\n h5RefresherProps: {\n touchHandlers: Record<string, unknown>\n pullDistance: number\n isRefreshing: boolean\n /** H5 单结构下恒为 true,仅兼容旧类型 */\n showRefresherLayer: boolean\n }\n addImperativeTouchListeners?: (el: HTMLElement) => () => void\n renderRefresherContent: () => React.ReactNode | null\n /**\n * 刷新区几何高度:H5 等非小程序原生路径下与 List 绝对层 height / translateY 及本 hook 内下拉收尾动画一致。\n * 小程序原生 refresher 由 ScrollView 负责展示与布局,List 侧槽位样式不依赖此字段。\n */\n slotHeight: number\n}\n\nexport function useRefresher(\n config: ListRefresherConfig | null,\n /** 列表逻辑顶部对应的 scrollTop,用于触顶判断;H5「顶栏悬浮+只滚列表」时传 0,imperative 内以 DOM scrollTop 为准 */\n scrollTopAtLogicalTop: number,\n /** scrollElement 模式下可选:下拉起始点须在 List 内才触发刷新;未传时默认 true(沿用原逻辑) */\n getIsTouchInListArea?: (ev: TouchEvent) => boolean,\n /** H5 等:开启刷新区时是否测量自定义内容高度(与 List 侧 isH5 && refresher 一致) */\n enableH5SlotMeasure?: boolean\n): UseRefresherReturn {\n const [internalRefreshing, setInternalRefreshing] = useState(false)\n const [pullDistance, setPullDistance] = useState(0)\n const pullDistanceRef = useRef(0)\n const rafRef = useRef<number | null>(null)\n const setPullDistanceRef = useRef(setPullDistance)\n const setInternalRefreshingRef = useRef(setInternalRefreshing)\n setPullDistanceRef.current = setPullDistance\n setInternalRefreshingRef.current = setInternalRefreshing\n pullDistanceRef.current = pullDistance\n\n const isControlled = typeof config?.refresherTriggered === 'boolean'\n const isRefreshing = isControlled ? (config?.refresherTriggered ?? false) : internalRefreshing\n const isRefreshingRef = useRef(isRefreshing)\n isRefreshingRef.current = isRefreshing\n /** 刷新中锁:runRefresh 内同步置 true,避免 setState 未重渲染前再次触摸触发刷新 */\n const refreshingLockRef = useRef(false)\n /** H5 当前刷新状态,用于 onRefresherStatusChange 避免重复触发 */\n const refreshStatusRef = useRef<RefreshStatus>(RefreshStatus.Idle)\n /** H5 是否启用下拉刷新:refresherEnabled === false 时不挂 touch、不显示顶栏 */\n const h5RefresherEnabled = !!config && config.refresherEnabled !== false\n\n /** touch 只挂一次,回调里读 ref 才能拿到最新配置,避免改预设后仍用旧值 */\n const thresholdRef = useRef(config?.refresherThreshold ?? 45)\n thresholdRef.current = config?.refresherThreshold ?? 45\n const configRef = useRef(config)\n configRef.current = config\n\n const emitStatusChangeRef = useRef((status: RefreshStatus, dy: number) => {\n if (refreshStatusRef.current !== status) {\n refreshStatusRef.current = status\n configRef.current?.onRefresherStatusChange?.({ detail: { status, dy } })\n }\n })\n const isControlledRef = useRef(isControlled)\n isControlledRef.current = isControlled\n /** H5 顶栏悬浮时 List 传 0,触顶即 scrollTop<=0+阈值;否则由 List 传列表顶对应的 scrollTop */\n const scrollTopWhenAtTop = !supportsNativeRefresher && config ? scrollTopAtLogicalTop : 0\n const topThresholdPx = scrollTopWhenAtTop + AT_TOP_THRESHOLD\n const topThresholdPxRef = useRef(topThresholdPx)\n topThresholdPxRef.current = topThresholdPx\n\n const getIsTouchInListAreaRef = useRef(getIsTouchInListArea)\n getIsTouchInListAreaRef.current = getIsTouchInListArea\n\n const [measuredSlotHeight, setMeasuredSlotHeight] = useState(0)\n const h5MeasureRef = useRef<any>(null)\n const setH5MeasureRef = useCallback((el: any) => {\n h5MeasureRef.current = el\n }, [])\n\n const hasCustomRefresherChildren = config?.children != null\n\n const slotHeight = useMemo(() => {\n if (!config || config.refresherEnabled === false) return DEFAULT_REFRESHER_HEIGHT\n if (!hasCustomRefresherChildren) return DEFAULT_REFRESHER_HEIGHT\n if (supportsNativeRefresher) return DEFAULT_REFRESHER_HEIGHT\n if (!enableH5SlotMeasure) return DEFAULT_REFRESHER_HEIGHT\n return measuredSlotHeight > 0 ? measuredSlotHeight : DEFAULT_REFRESHER_HEIGHT\n }, [\n config,\n hasCustomRefresherChildren,\n measuredSlotHeight,\n enableH5SlotMeasure,\n ])\n\n const slotHeightRef = useRef(slotHeight)\n slotHeightRef.current = slotHeight\n\n useLayoutEffect(() => {\n if (!enableH5SlotMeasure) {\n setMeasuredSlotHeight(0)\n return\n }\n if (!hasCustomRefresherChildren) return\n const node = resolveTaroMeasureElement(h5MeasureRef)\n if (!node || typeof ResizeObserver === 'undefined') return\n const ro = new ResizeObserver((entries) => {\n const entry = entries[0]\n if (!entry) return\n const h = Math.max(1, Math.ceil(entry.contentRect.height))\n setMeasuredSlotHeight(prev => (prev === h ? prev : h))\n })\n ro.observe(node)\n return () => ro.disconnect()\n }, [enableH5SlotMeasure, hasCustomRefresherChildren, config?.children])\n\n const scrollViewRefresherProps = config && supportsNativeRefresher ? {\n refresherEnabled: config.refresherEnabled ?? true,\n refresherThreshold: config.refresherThreshold ?? 45,\n refresherDefaultStyle: config.refresherDefaultStyle ?? 'black',\n refresherBackground: config.refresherBackground ?? '#fff',\n refresherTriggered: isRefreshing,\n } : {}\n\n const scrollViewRefresherHandlers = config && supportsNativeRefresher ? {\n onRefresherPulling: (e: any) => {\n config.onRefresherPulling?.({ detail: { deltaY: e.detail?.deltaY ?? 0 } })\n },\n onRefresherRefresh: async () => {\n if (!isControlled) setInternalRefreshing(true)\n try {\n await config.onRefresherRefresh?.()\n } catch {\n // 原生不派发 Failed(4),补发便于与 H5 一致\n config.onRefresherStatusChange?.({ detail: { status: RefreshStatus.Failed, dy: 0 } })\n } finally {\n if (!isControlled) setInternalRefreshing(false)\n }\n },\n onRefresherRestore: () => config.onRefresherRestore?.(),\n onRefresherAbort: () => config.onRefresherAbort?.(),\n // 小程序特有事件:即将触发刷新(拖动超过 threshold 时)\n onRefresherWillRefresh: () => config.onRefresherWillRefresh?.(),\n // 小程序特有事件:下拉刷新状态变化\n onRefresherStatusChange: (e: any) => {\n config.onRefresherStatusChange?.({ detail: { status: e.detail?.status, dy: e.detail?.dy } })\n },\n } : {}\n\n const addImperativeTouchListeners = React.useCallback((el: HTMLElement) => {\n if (supportsNativeRefresher || !configRef.current || !h5RefresherEnabled) return () => {}\n const scrollEl = el as HTMLDivElement\n const startY = { current: 0 }\n const startX = { current: 0 }\n const lastY = { current: 0 }\n let touchStartedAtTop = false\n /** 下拉起始点是否在 List 内(scrollElement 模式);未传 getIsTouchInListArea 时恒为 true */\n let touchStartedInListArea = true\n let dragOnEdge = false\n let lastPull = 0\n /** 用于 onTouchEnd 判断是否触发刷新;刷新完成后必须置 0,否则下次点击(无 touchMove)会误用上次的 lastPull 再次触发 */\n const lastPullRef = { current: 0 }\n const pullAtReleaseRef = { current: 0 }\n\n const setPull = (v: number) => {\n lastPull = v\n lastPullRef.current = v\n setPullDistanceRef.current(v)\n }\n\n const runBounceBack = (fromValue: number, onComplete?: () => void) => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n const v = fromValue * (1 - ease)\n setPullDistanceRef.current(v)\n lastPullRef.current = v\n lastPull = v\n if (t < 1) {\n rafRef.current = requestAnimationFrame(animate)\n } else {\n setPullDistanceRef.current(0)\n if (!isControlledRef.current) setInternalRefreshingRef.current(false)\n rafRef.current = null\n onComplete?.()\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n\n /** 未达阈值松手回弹结束:通知中止 */\n const runBounceBackAbort = (fromValue: number) => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n const v = fromValue * (1 - ease)\n setPullDistanceRef.current(v)\n lastPullRef.current = v\n lastPull = v\n if (t < 1) rafRef.current = requestAnimationFrame(animate)\n else {\n setPullDistanceRef.current(0)\n rafRef.current = null\n lastPullRef.current = 0\n lastPull = 0\n configRef.current?.onRefresherAbort?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n\n /** 收起到加载高度后再执行 onRefresherRefresh */\n const runBounceToLoading = (fromValue: number, toValue: number, onReach: () => void) => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n setPullDistanceRef.current(fromValue + (toValue - fromValue) * ease)\n if (t < 1) {\n rafRef.current = requestAnimationFrame(animate)\n } else {\n setPullDistanceRef.current(toValue)\n rafRef.current = null\n onReach()\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n\n const isEdge = () => (scrollEl.scrollTop ?? 0) <= topThresholdPxRef.current\n\n const onTouchStart = (e: TouchEvent) => {\n if (refreshingLockRef.current || isRefreshingRef.current) return\n if (rafRef.current != null) {\n cancelAnimationFrame(rafRef.current)\n rafRef.current = null\n }\n lastPull = lastPullRef.current\n touchStartedAtTop = isEdge()\n touchStartedInListArea = getIsTouchInListAreaRef.current?.(e) ?? true\n const t0 = e.touches[0]\n if (t0) {\n startY.current = t0.clientY\n startX.current = t0.clientX\n lastY.current = t0.clientY\n }\n }\n\n const onTouchMove = (ev: TouchEvent) => {\n if (refreshingLockRef.current || isRefreshingRef.current) return\n if (!touchStartedInListArea) return\n const touch = ev.touches[0]\n if (!touch) return\n const currentY = touch.clientY\n const currentX = touch.clientX\n if (!isEdge()) {\n setPull(0)\n dragOnEdge = false\n return\n }\n // 到顶后:若 touch 开始时不在顶部,在首次下拉(dy>0)时「采纳」该手势,使同一手势内滚到顶后继续下拉可触发刷新\n if (!touchStartedAtTop && !dragOnEdge) {\n const dyCheck = currentY - lastY.current\n if (dyCheck <= 0) return\n touchStartedAtTop = true\n // 重置起点,避免采纳时 dy 过大导致刷新层瞬间拉满\n startY.current = currentY\n startX.current = currentX\n lastY.current = currentY\n }\n\n const dy = currentY - lastY.current\n // 还没进入下拉拖拽阶段(dragOnEdge=false)时,先看第一下是往上还是往下:\n // - 第一笔就是往上滑(dy<=0):视为正常滚动,直接交给原生 Scroll,不拦截、不启动下拉逻辑\n // - 第一笔是往下滑(dy>0):才认为是一次「下拉刷新」手势,进入拖拽模式\n if (!dragOnEdge) {\n if (dy <= 0) {\n lastY.current = currentY\n startY.current = currentY\n startX.current = currentX\n return\n }\n // 真正开始下拉刷新\n dragOnEdge = true\n startY.current = currentY\n startX.current = currentX\n }\n\n if (ev.cancelable) ev.preventDefault()\n const totalMove = currentY - startY.current\n const dx = currentX - startX.current\n if (dy <= 0) {\n lastY.current = currentY\n const next = Math.max(0, lastPull + dy)\n setPull(next)\n return\n }\n const deg = Math.atan(Math.abs(dx) / dy) * (180 / Math.PI)\n if (deg > DEG_LIMIT) {\n startY.current = currentY\n startX.current = currentX\n lastY.current = currentY\n return\n }\n lastY.current = currentY\n const vh = getViewportHeightPx()\n const maxPull = vh * H5_PULL_DISTANCE_MAX_VH\n const dampingLimit = vh * H5_DAMPING_LIMIT_VH\n const damped = dampIncrement(dy, totalMove, lastPull, vh, dampingLimit)\n const next = Math.min(lastPull + damped, maxPull)\n setPull(next)\n configRef.current?.onRefresherPulling?.({ detail: { deltaY: next } })\n if (next >= thresholdRef.current) {\n configRef.current?.onRefresherWillRefresh?.()\n emitStatusChangeRef.current(RefreshStatus.CanRefresh, next)\n } else {\n emitStatusChangeRef.current(RefreshStatus.Idle, next)\n }\n }\n\n const runRefresh = () => {\n const cfg = configRef.current\n if (!cfg || refreshingLockRef.current || isRefreshingRef.current) return\n refreshingLockRef.current = true\n const pullValue = lastPull\n const height = slotHeightRef.current\n pullAtReleaseRef.current = pullValue\n if (!isControlledRef.current) setInternalRefreshingRef.current(true)\n emitStatusChangeRef.current(RefreshStatus.Refreshing, pullValue)\n runBounceToLoading(pullValue, height, () => {\n const safeReset = () => {\n setPullDistanceRef.current(0)\n if (!isControlledRef.current) setInternalRefreshingRef.current(false)\n refreshingLockRef.current = false\n lastPullRef.current = 0\n lastPull = 0\n pullAtReleaseRef.current = 0\n configRef.current?.onRefresherRestore?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n }\n Promise.resolve(configRef.current?.onRefresherRefresh?.())\n .then(\n () => {\n if (!refreshingLockRef.current) return\n const slotH = slotHeightRef.current\n emitStatusChangeRef.current(RefreshStatus.Completed, slotH)\n requestAnimationFrame(() =>\n runBounceBack(slotH, () => {\n refreshingLockRef.current = false\n lastPullRef.current = 0\n lastPull = 0\n pullAtReleaseRef.current = 0\n configRef.current?.onRefresherRestore?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n })\n )\n },\n () => {\n emitStatusChangeRef.current(RefreshStatus.Failed, pullValue)\n emitStatusChangeRef.current(RefreshStatus.Completed, slotHeightRef.current)\n safeReset()\n }\n )\n })\n }\n\n const onTouchEnd = () => {\n if (refreshingLockRef.current) return\n if (!touchStartedInListArea) return\n dragOnEdge = false\n const current = lastPullRef.current\n if (current >= thresholdRef.current) {\n runRefresh()\n } else {\n if (current > 0) {\n runBounceBackAbort(current)\n }\n }\n }\n\n const optsMove = { passive: false, capture: true }\n const optsEnd = { passive: true, capture: true }\n el.addEventListener('touchstart', onTouchStart, { passive: true })\n el.addEventListener('touchmove', onTouchMove, optsMove)\n el.addEventListener('touchend', onTouchEnd, optsEnd)\n el.addEventListener('touchcancel', onTouchEnd, optsEnd)\n return () => {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n el.removeEventListener('touchstart', onTouchStart)\n el.removeEventListener('touchmove', onTouchMove, optsMove)\n el.removeEventListener('touchend', onTouchEnd, optsEnd)\n el.removeEventListener('touchcancel', onTouchEnd, optsEnd)\n }\n }, [h5RefresherEnabled])\n\n const renderRefresherContent = useCallback(() => {\n if (!config) return null\n const threshold = config.refresherThreshold ?? 45\n const defaultStyle = config.refresherDefaultStyle ?? 'black'\n const background = config.refresherBackground ?? '#fff'\n const hasCustomChildren = config.children != null\n\n // 小程序:自定义内容时返回 Slot(name=refresher),避免 View 的 slot 属性在模板层被过滤\n // 样式对齐 H5:由内层 View 统一承载容器样式\n if (supportsNativeRefresher) {\n // 小程序需要名为 refresher 的插槽来指定自定义刷新内容\n return hasCustomChildren && defaultStyle === 'none'\n ? (\n <Slot\n name=\"refresher\"\n style={{\n position: 'absolute',\n left: 0,\n right: 0,\n zIndex: 0,\n }}\n >\n <View\n style={{\n width: '100%',\n flexShrink: 0,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background,\n }}\n >\n {config.children}\n </View>\n </Slot>\n )\n : null\n }\n\n // H5:refresherDefaultStyle 控制默认指示器样式(对齐小程序 black/white/none)\n // black=深色文案 white=浅色文案 none=仅展示 children,不展示默认「下拉/释放/加载中」\n const textColor = defaultStyle === 'white' ? '#fff' : defaultStyle === 'black' ? '#333' : undefined\n // 有自定义 children 且 style=none 时隐藏默认文字\n const showDefaultText = !(defaultStyle === 'none' && hasCustomChildren)\n const defaultText = showDefaultText\n ? (isRefreshing ? '加载中...' : pullDistance >= threshold ? '释放刷新' : '下拉刷新')\n : null\n\n return (\n <View\n ref={!supportsNativeRefresher && hasCustomChildren ? setH5MeasureRef : undefined}\n style={{\n width: '100%',\n minHeight: hasCustomChildren ? undefined : DEFAULT_REFRESHER_HEIGHT,\n height: hasCustomChildren ? 'auto' : DEFAULT_REFRESHER_HEIGHT,\n flexShrink: 0,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background,\n }}\n >\n {hasCustomChildren ? config.children : (\n defaultText ? <View style={textColor ? { color: textColor } : undefined}>{defaultText}</View> : null\n )}\n </View>\n )\n }, [config, pullDistance, isRefreshing, setH5MeasureRef])\n\n /** 受控 refresherTriggered=true:无下拉也显示加载条 */\n React.useEffect(() => {\n if (!isControlled || !config || config.refresherTriggered !== true) return\n const h = slotHeightRef.current\n if (pullDistanceRef.current >= h) return\n setPullDistanceRef.current(h)\n pullDistanceRef.current = h\n emitStatusChangeRef.current(RefreshStatus.Refreshing, h)\n }, [isControlled, config?.refresherTriggered, slotHeight])\n\n /** 受控 refresherTriggered=false:回弹清零;与 touch 共用 rafRef,cancel 时须在此释放 refreshingLockRef */\n const prevTriggeredRef = useRef(config?.refresherTriggered)\n React.useEffect(() => {\n if (!isControlled || !config || config.refresherTriggered !== false) {\n prevTriggeredRef.current = config?.refresherTriggered\n return\n }\n const prev = prevTriggeredRef.current\n prevTriggeredRef.current = false\n if (prev === true && (pullDistanceRef.current > 0 || isRefreshingRef.current)) {\n if (rafRef.current != null) cancelAnimationFrame(rafRef.current)\n const from = pullDistanceRef.current > 0 ? pullDistanceRef.current : slotHeightRef.current\n emitStatusChangeRef.current(RefreshStatus.Completed, from)\n const startTime = nowMs()\n const animate = () => {\n const t = Math.min((nowMs() - startTime) / BOUNCE_MS, 1)\n const ease = 1 - Math.pow(1 - t, 3)\n const v = from * (1 - ease)\n setPullDistanceRef.current(v)\n pullDistanceRef.current = v\n if (t < 1) rafRef.current = requestAnimationFrame(animate)\n else {\n setPullDistanceRef.current(0)\n pullDistanceRef.current = 0\n if (!isControlledRef.current) setInternalRefreshingRef.current(false)\n rafRef.current = null\n refreshingLockRef.current = false\n config.onRefresherRestore?.()\n emitStatusChangeRef.current(RefreshStatus.Idle, 0)\n }\n }\n rafRef.current = requestAnimationFrame(animate)\n }\n }, [isControlled, config?.refresherTriggered, slotHeight])\n\n return {\n scrollViewRefresherProps,\n scrollViewRefresherHandlers,\n h5RefresherProps: {\n touchHandlers: {},\n pullDistance,\n isRefreshing,\n showRefresherLayer: !supportsNativeRefresher && !!config && h5RefresherEnabled,\n },\n addImperativeTouchListeners: !supportsNativeRefresher && config && h5RefresherEnabled ? addImperativeTouchListeners : undefined,\n renderRefresherContent,\n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CAAC;oBAC3B,IAAI,CAAC,eAAe,CAAC,OAAO;AAAE,wBAAA,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC;AACrE,oBAAA,MAAM,CAAC,OAAO,GAAG,IAAI;AACrB,oBAAA,iBAAiB,CAAC,OAAO,GAAG,KAAK;AACjC,oBAAA,CAAA,EAAA,GAAA,MAAM,CAAC,kBAAkB,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,MAAA,CAAI;AAC7B,oBAAA,mBAAmB,CAAC,OAAO,CAAqB,CAAA,2BAAA,CAAC,CAAC;;AAEtD,aAAC;AACD,YAAA,MAAM,CAAC,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC;;AAEnD,KAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,MAAM,CAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;IAE1D,OAAO;QACL,wBAAwB;QACxB,2BAA2B;AAC3B,QAAA,gBAAgB,EAAE;AAChB,YAAA,aAAa,EAAE,EAAE;YACjB,YAAY;YACZ,YAAY;YACZ,kBAAkB,EAAE,CAAC,uBAAuB,IAAI,CAAC,CAAC,MAAM,IAAI,kBAAkB;AAC/E,SAAA;AACD,QAAA,2BAA2B,EAAE,CAAC,uBAAuB,IAAI,MAAM,IAAI,kBAAkB,GAAG,2BAA2B,GAAG,SAAS;QAC/H,sBAAsB;QACtB,UAAU;KACX;AACH;;;;"}
@@ -8,7 +8,7 @@ import { useItemSizeCache } from './hooks/useItemSizeCache.js';
8
8
  import { useListNestedScroll } from './hooks/useListNestedScroll.js';
9
9
  import { useListScrollElementAttach } from './hooks/useListScrollElementAttach.js';
10
10
  import { useListScrollElementAttachWeapp } from './hooks/useListScrollElementAttachWeapp.js';
11
- import { useRefresher, DEFAULT_REFRESHER_HEIGHT } from './hooks/useRefresher.js';
11
+ import { useRefresher } from './hooks/useRefresher.js';
12
12
  import { useResizeObserver } from './hooks/useResizeObserver.js';
13
13
  import { useScrollCorrection } from './hooks/useScrollCorrection.js';
14
14
  import { ListItem } from './ListItem.js';
@@ -332,9 +332,9 @@ const InnerList = (props, ref) => {
332
332
  return config;
333
333
  }, [children, props.showNoMore, props.noMoreText, props.noMoreStyle, props.renderNoMore]);
334
334
  // Refresher 平台适配:H5 用 addImperativeTouchListeners
335
- const { scrollViewRefresherProps, scrollViewRefresherHandlers, h5RefresherProps, addImperativeTouchListeners, renderRefresherContent, } = useRefresher(refresherConfig, isH5 && refresherConfig && !supportsNativeRefresher ? 0 : renderOffset, useScrollElementMode
335
+ const { scrollViewRefresherProps, scrollViewRefresherHandlers, h5RefresherProps, addImperativeTouchListeners, renderRefresherContent, slotHeight: h5RefresherSlotHeight, } = useRefresher(refresherConfig, isH5 && refresherConfig && !supportsNativeRefresher ? 0 : renderOffset, useScrollElementMode
336
336
  ? (ev) => { var _a, _b; return (_b = (ev.target != null && ((_a = contentWrapperRef.current) === null || _a === void 0 ? void 0 : _a.contains(ev.target)))) !== null && _b !== void 0 ? _b : false; }
337
- : undefined);
337
+ : undefined, !!(isH5 && refresherConfig && !supportsNativeRefresher && refresherConfig.refresherEnabled !== false));
338
338
  const refresherTeardownRef = React.useRef(null);
339
339
  const addImperativeTouchListenersRef = React.useRef(addImperativeTouchListeners);
340
340
  addImperativeTouchListenersRef.current = addImperativeTouchListeners;
@@ -342,8 +342,10 @@ const InnerList = (props, ref) => {
342
342
  if (refresherTeardownRef.current)
343
343
  refresherTeardownRef.current();
344
344
  }, []);
345
- // H5 下拉刷新顶栏高度(默认 50px,来自 useRefresher)
346
- const refresherHeightForH5 = (isH5 && refresherConfig && !supportsNativeRefresher && refresherConfig.refresherEnabled !== false) ? DEFAULT_REFRESHER_HEIGHT : 0;
345
+ // H5 下拉刷新顶栏高度:自定义内容由 useRefresher 内 ResizeObserver 测量,否则默认 50
346
+ const refresherHeightForH5 = (isH5 && refresherConfig && !supportsNativeRefresher && refresherConfig.refresherEnabled !== false)
347
+ ? h5RefresherSlotHeight
348
+ : 0;
347
349
  // 解析分组结构:StickySection、ListItem 为直接子组件,过滤 Refresher/NoMore
348
350
  const sections = React.useMemo(() => {
349
351
  const result = [];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport Taro from '@tarojs/taro'\nimport React from 'react'\n\nimport { getScrollViewContextNode } from '../../utils'\nimport { ScrollElementContextOrFallback } from '../../utils/scrollElementContext'\nimport { useItemSizeCache } from './hooks/useItemSizeCache'\nimport { useListNestedScroll } from './hooks/useListNestedScroll'\nimport { type ListScrollElementAttachRefs, useListScrollElementAttach } from './hooks/useListScrollElementAttach'\nimport { useListScrollElementAttachWeapp } from './hooks/useListScrollElementAttachWeapp'\nimport { type ListRefresherConfig, DEFAULT_REFRESHER_HEIGHT, useRefresher } from './hooks/useRefresher'\nimport { useResizeObserver } from './hooks/useResizeObserver'\nimport { useScrollCorrection } from './hooks/useScrollCorrection'\nimport ListItem from './ListItem'\nimport NoMore, { type NoMoreProps } from './NoMore'\nimport StickyHeader from './StickyHeader'\nimport StickySection from './StickySection'\nimport { createSelectorQueryScoped, isH5, isWeapp, supportsNativeRefresher } from './utils'\n\n/** 与官方 List.d.ts / ScrollView / harmony 对齐,不增减已有语义;扩展项仅用于高级能力 */\nexport interface ListProps {\n // ===== 与 ScrollView / List.d.ts 一致 =====\n showScrollbar?: boolean\n scrollTop?: number\n scrollX?: boolean\n scrollY?: boolean\n onScroll?: (e: { scrollTop: number, scrollLeft: number, detail: { scrollTop: number, scrollLeft: number } }) => void\n onScrollToUpper?: () => void\n onScrollToLower?: () => void\n upperThreshold?: number\n lowerThreshold?: number\n /** 与 ScrollView cacheExtent 对齐(视口外渲染距离),可选 */\n cacheExtent?: number\n /** 与 ScrollView enableBackToTop 对齐 */\n enableBackToTop?: boolean\n /** 与 ScrollView onScrollStart 对齐 */\n onScrollStart?: () => void\n /** 与 ScrollView onScrollEnd 对齐 */\n onScrollEnd?: () => void\n scrollIntoView?: string\n /** 透传给最外层 ScrollView 的 className,便于自定义样式 */\n className?: string\n\n // ===== 与 harmony-cpp ListProps / ListBuilder 对齐 =====\n stickyHeader?: boolean\n space?: number\n cacheCount?: number\n itemData?: any[]\n itemSize?: number | ((index: number, data?: any[]) => number)\n height?: number | string\n width?: number | string\n style?: React.CSSProperties\n children?: React.ReactNode\n /** Header 沿滚动方向尺寸;未传时回退到 itemSize */\n headerSize?: number\n\n // ===== 动态尺寸(与 type=\"dynamic\" 语义对齐)=====\n useResizeObserver?: boolean\n onItemSizeChange?: (index: number, size: number) => void\n\n // ===== NoMore 底部提示 =====\n showNoMore?: boolean\n noMoreText?: string\n noMoreStyle?: React.CSSProperties\n renderNoMore?: () => React.ReactNode\n\n // ===== 扩展:可见索引回调 =====\n onScrollIndex?: (start: number, end: number) => void\n\n // ===== 与 dynamic/harmony 对齐:List 自身可配置下拉刷新,无需 Refresher 子组件 =====\n /** 是否开启下拉刷新;与 Refresher 子组件二选一或同时存在(Refresher 子覆盖同名字段) */\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: 'black' | 'white' | 'none'\n refresherBackground?: string\n refresherTriggered?: boolean\n onRefresherPulling?: (e?: { detail?: { deltaY?: number } }) => void\n onRefresherRefresh?: () => void | Promise<void>\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n onRefresherWillRefresh?: () => void\n onRefresherStatusChange?: (e?: { detail?: { status?: number, dy?: number } }) => void\n\n /** 嵌套滚动:父级滚动,需 scrollElement 或 Context */\n nestedScroll?: boolean\n /** 父级滚动容器 ref */\n scrollElement?: React.RefObject<HTMLElement | null>\n /** 向外透出滚动容器,供子 List 作 scrollElement */\n scrollRef?: React.MutableRefObject<HTMLElement | null>\n /** 仅小程序:SelectorQuery / IO 作用域(如自定义组件内传 `this`),未传则沿用 page */\n selectorQueryScope?: object\n}\n\nexport interface ListHandle {\n scroll: (options?: {\n top?: number\n left?: number\n }) => void\n}\n\nexport function accumulate(arr: number[]) {\n const result = [0]\n for (let i = 0; i < arr.length; i++) {\n result[i + 1] = result[i] + arr[i]\n }\n return result\n}\n\nexport function isShaking(diffList: number[]): boolean {\n if (diffList.length < 3) return false\n const signs = diffList.map(diff => Math.sign(diff))\n let alternations = 0\n for (let i = 1; i < signs.length; i++) {\n if (signs[i] !== 0 && signs[i] !== signs[i - 1]) alternations++\n }\n return alternations >= 2\n}\n\n// 小程序端:判断 item 是否应该执行 SelectorQuery 测量(仅检查是否已测量过)\n// SelectorQuery 是只读查询,不会触发 setData,滚动期间执行是安全的\nfunction shouldMeasureWeappItem(index: number, measuredSet: Set<number>): boolean {\n return !measuredSet.has(index)\n}\n\n// 小程序端暂不外抛 onItemSizeChange,避免父层重渲染导致 List remount 引发回顶或空白\nfunction weappDeferItemSizeChange(_index: number, _size: number, _onItemSizeChange?: (index: number, size: number) => void) {}\n\n/** 向后兼容:ListScrollElementContext 已统一为 ScrollElementContext,无 Context 时兜底为 fallback */\nexport { ScrollElementContextOrFallback as ListScrollElementContext } from '../../utils/scrollElementContext'\n\n\n/** 从 scroll 选项解析目标偏移量 */\nfunction resolveScrollTargetOffset(\n options: { top?: number, left?: number } | undefined,\n isHorizontal: boolean\n): number {\n const opts = options ?? {}\n const top = typeof opts.top === 'number' ? opts.top : undefined\n const left = typeof opts.left === 'number' ? opts.left : undefined\n let result = 0\n if (isHorizontal) {\n if (typeof left === 'number') result = left\n else if (typeof top === 'number') result = top\n } else {\n if (typeof top === 'number') result = top\n else if (typeof left === 'number') result = left\n }\n return Number.isFinite(result) ? result : 0\n}\n\n// eslint-disable-next-line complexity -- List 多端/多模式逻辑集中,已抽离 useListNestedScroll、useListScrollElementAttach、resolveScrollTargetOffset 等\nconst InnerList = (props: ListProps, ref: React.Ref<ListHandle | null>) => {\n const {\n stickyHeader = false,\n space = 0,\n height = 400,\n width = '100%',\n showScrollbar = true,\n scrollTop: controlledScrollTop,\n scrollX = false,\n scrollY = true,\n onScroll,\n onScrollToUpper,\n onScrollToLower,\n onScrollStart,\n onScrollEnd,\n upperThreshold = 50,\n lowerThreshold = 50,\n cacheCount = 2,\n cacheExtent,\n enableBackToTop,\n className,\n style,\n children,\n nestedScroll,\n scrollElement,\n scrollRef: scrollRefProp,\n } = props\n\n const isHorizontal = scrollX === true\n const listType = nestedScroll === true ? 'nested' : 'default'\n const {\n effectiveScrollElement,\n effectiveStartOffset,\n effectiveStartOffsetRef,\n useScrollElementMode,\n needAutoFind,\n autoFindStatus,\n contentWrapperRef,\n contentId,\n } = useListNestedScroll(listType, scrollElement, undefined, isHorizontal, props.selectorQueryScope)\n const DEFAULT_ITEM_WIDTH = 120\n const DEFAULT_ITEM_HEIGHT = 40\n const defaultItemSize = isHorizontal ? DEFAULT_ITEM_WIDTH : DEFAULT_ITEM_HEIGHT\n\n const normalizeSize = React.useCallback((value: unknown): number | null => {\n if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) return null\n return value\n }, [])\n\n const resolveItemSizeByIndex = React.useCallback((index: number, fallback: number) => {\n const { itemSize, itemData } = props\n const numberSize = normalizeSize(itemSize)\n if (numberSize != null) return numberSize\n if (typeof itemSize === 'function') {\n const functionSize = normalizeSize(itemSize(index, itemData))\n if (functionSize != null) return functionSize\n }\n return fallback\n }, [props.itemSize, props.itemData, normalizeSize])\n\n // 滚动状态管理\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n // 生成唯一 List ID(用于小程序 ResizeObserver)\n const listId = React.useMemo(() => `list-${Math.random().toString(36).slice(2, 11)}`, [])\n\n // 渲染偏移量 - 用于计算应该渲染哪些元素\n const [renderOffset, setRenderOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 程序性滚动用的目标偏移;用户滑动期间不更新,避免与原生滚动冲突\n const [scrollViewOffset, setScrollViewOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 用户正在滑动时不再向 ScrollView 传 scrollTop,让滚动完全由原生接管\n const [isUserScrolling, setIsUserScrolling] = React.useState(false)\n // isUserScrolling 的 ref 镜像,供异步上下文读取最新值\n const isUserScrollingRef = React.useRef(false)\n\n const initialContainerLength = typeof (isHorizontal ? width : height) === 'number' ? (isHorizontal ? (width as number) : (height as number)) : 400\n const [containerLength, setContainerLength] = React.useState<number>(initialContainerLength)\n\n // 用容器实际尺寸更新视口长度,避免 props 与 CSS 不一致导致底部空白\n React.useEffect(() => {\n const el = containerRef.current\n if (!el || typeof ResizeObserver === 'undefined') return\n const ro = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { contentRect } = entry\n const measured = isHorizontal ? contentRect.width : contentRect.height\n if (measured > 0) setContainerLength(measured)\n }\n })\n ro.observe(el)\n return () => ro.disconnect()\n }, [isHorizontal])\n\n // WeChat 小程序:没有原生 ResizeObserver,用 SelectorQuery 一次性测量容器高度\n React.useEffect(() => {\n if (!isWeapp) return\n Taro.nextTick(() => {\n createSelectorQueryScoped(props.selectorQueryScope)\n .select(`#${listId}`)\n .boundingClientRect((rect: any) => {\n const measured = isHorizontal ? rect?.width : rect?.height\n if (typeof measured === 'number' && measured > 0) {\n setContainerLength(measured)\n }\n })\n .exec()\n })\n }, [isWeapp, isHorizontal, listId])\n\n // 滚动追踪相关refs\n const isScrollingRef = React.useRef(false)\n const lastScrollTopRef = React.useRef(controlledScrollTop ?? 0)\n const scrollDiffListRef = React.useRef<number[]>([0, 0, 0])\n const scrollTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n // H5:仅程序性滚动时写回 DOM scrollTop,用户滑动结束后不写回避免卡顿\n const programmaticScrollRef = React.useRef(false)\n // 小程序端程序性滚动冷却期:handleScroll 只更新 renderOffset,避免 scrollIntoView 后被原生回调拉回\n const programmaticCooldownRef = React.useRef(false)\n const programmaticCooldownTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const scrollViewOffsetRef = React.useRef(0)\n // 用户滚动期间挂起的 reflow 标记(用于滚动结束后补触发)\n const pendingWeappReflowRef = React.useRef(false)\n // ref 持有最新版 scheduleWeappDynamicReflow,供 updateRenderOffset 内的 setTimeout 闭包安全访问\n const scheduleWeappDynamicReflowRef = React.useRef(null as unknown as VoidFunction)\n // 处理渲染偏移量更新。\n // syncToScrollView=true:程序性滚动,立即同步 scrollViewOffset。\n // syncToScrollView=false:用户滑动,仅更新 renderOffset。weapp 采用 recycle-view 策略:不把用户滑动位置同步到 scrollViewOffset,避免「传滞后值拉回」和「从有到无归顶」。\n const updateRenderOffset = React.useCallback((newOffset: number, syncToScrollView?: boolean, source?: string) => {\n lastScrollTopRef.current = newOffset\n isScrollingRef.current = true\n\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n\n setRenderOffset(newOffset) // 始终更新虚拟列表用到的偏移\n\n if (syncToScrollView) {\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // 小程序:target===sv 时 ScrollView 认为无变化不滚动→白屏;imperative/scrollIntoView 时先传中间值再 RAF 传 target 强制触发\n // target=0 用 +0.01;target>0 用 -0.01(统一 +0.01 到底部会被 clamp 成同值无效)\n const same = isWeapp && Math.abs(scrollViewOffsetRef.current - newOffset) < 1\n const needForce = same && (source === 'imperative' || source === 'scrollIntoView')\n if (needForce) {\n const intermediate = newOffset > 0 ? newOffset - 0.01 : 0.01\n setScrollViewOffset(intermediate)\n programmaticScrollRef.current = true\n requestAnimationFrame(() => {\n // 第二帧也需要标记为程序性滚动,否则 else 分支不会传 scrollTop\n programmaticScrollRef.current = true\n setScrollViewOffset(newOffset)\n })\n } else {\n setScrollViewOffset(newOffset)\n }\n programmaticScrollRef.current = true\n if (isWeapp) {\n programmaticCooldownRef.current = true\n if (programmaticCooldownTimerRef.current) {\n clearTimeout(programmaticCooldownTimerRef.current)\n }\n programmaticCooldownTimerRef.current = setTimeout(() => {\n programmaticCooldownRef.current = false\n }, 500)\n }\n } else {\n isUserScrollingRef.current = true\n setIsUserScrolling(true)\n }\n\n scrollTimeoutRef.current = setTimeout(() => {\n isScrollingRef.current = false\n if (!syncToScrollView) {\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // weapp recycle-view 策略:用户滑动结束后不同步 scrollViewOffset,保持 pass 的值不变,避免 从有到无 归顶\n if (!isWeapp) {\n setScrollViewOffset(lastScrollTopRef.current)\n }\n // 滚动结束后触发期间被延迟的 reflow(item 首次测量触发)\n if (isWeapp && pendingWeappReflowRef.current) {\n scheduleWeappDynamicReflowRef.current()\n }\n }\n }, isWeapp ? 200 : 150)\n }, [])\n\n // 暴露给外部的实例方法:通过 ref.scroll({ top / left }) 进行程序性滚动\n React.useImperativeHandle(\n ref,\n () => ({\n scroll(options) {\n const targetOffset = resolveScrollTargetOffset(options, isHorizontal)\n const el = effectiveScrollElement?.current\n if (el && isH5) {\n const scrollTarget = targetOffset + effectiveStartOffset\n if (isHorizontal) {\n el.scrollTo({ left: scrollTarget })\n } else {\n el.scrollTo({ top: scrollTarget })\n }\n updateRenderOffset(targetOffset, false, 'scrollElement')\n } else if (el && isWeapp && useScrollElementMode) {\n // 小程序 scrollElement 模式:需通过 getScrollViewContextNode + node.scrollTo 真正滚动外部 scroll-view\n // updateRenderOffset 必须在 scrollTo 之后调用,否则 getScrollViewContextNode 异步期间会先更新 renderOffset 导致闪一下\n const startOff = effectiveStartOffsetRef.current\n const scrollTarget = targetOffset + startOff\n const scrollViewId = (el as any).id || `_ls_${listId}`\n if (!(el as any).id) (el as any).id = scrollViewId\n getScrollViewContextNode(`#${scrollViewId}`).then((node: any) => {\n if (isHorizontal) {\n node?.scrollTo?.({ left: scrollTarget, animated: false })\n } else {\n node?.scrollTo?.({ top: scrollTarget, animated: false })\n }\n updateRenderOffset(targetOffset, true, 'imperative')\n })\n } else {\n updateRenderOffset(targetOffset, true, 'imperative')\n }\n },\n }),\n [scrollX, effectiveScrollElement, effectiveStartOffset, effectiveStartOffsetRef, isH5, isWeapp, isHorizontal, listId, useScrollElementMode, updateRenderOffset]\n )\n\n // 提取 Refresher 配置(List 属性为 base,Refresher 子组件覆盖)\n const refresherConfig = React.useMemo((): ListRefresherConfig | null => {\n const listRefresherEnabled = props.refresherEnabled !== false && (\n props.refresherEnabled === true || props.onRefresherRefresh != null\n )\n const baseFromList: ListRefresherConfig | null = listRefresherEnabled\n ? {\n refresherEnabled: props.refresherEnabled,\n refresherThreshold: props.refresherThreshold,\n refresherDefaultStyle: props.refresherDefaultStyle,\n refresherBackground: props.refresherBackground,\n refresherTriggered: props.refresherTriggered,\n onRefresherPulling: props.onRefresherPulling,\n onRefresherRefresh: props.onRefresherRefresh,\n onRefresherRestore: props.onRefresherRestore,\n onRefresherAbort: props.onRefresherAbort,\n onRefresherWillRefresh: props.onRefresherWillRefresh,\n onRefresherStatusChange: props.onRefresherStatusChange,\n }\n : null\n\n const isRefresherComponent = (child: React.ReactElement): boolean => {\n const type = child.type as any\n return type?.displayName === 'Refresher' || type?.name === 'Refresher'\n }\n\n let refresherChildProps: ListRefresherConfig | null = null\n let refresherCount = 0\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child) && isRefresherComponent(child)) {\n refresherCount++\n if (refresherCount > 1) {\n return\n }\n refresherChildProps = child.props as ListRefresherConfig\n }\n })\n\n if (refresherChildProps != null) {\n const base = baseFromList ?? {}\n // Refresher 子组件的配置覆盖 List 的配置\n return {\n ...base,\n ...refresherChildProps,\n } as ListRefresherConfig\n }\n return baseFromList\n }, [\n children,\n props.refresherEnabled,\n props.refresherThreshold,\n props.refresherDefaultStyle,\n props.refresherBackground,\n props.refresherTriggered,\n props.onRefresherPulling,\n props.onRefresherRefresh,\n props.onRefresherRestore,\n props.onRefresherAbort,\n props.onRefresherWillRefresh,\n props.onRefresherStatusChange,\n ])\n\n // 提取 NoMore 配置\n const noMoreConfig = React.useMemo(() => {\n let config: NoMoreProps | null = null\n let noMoreCount = 0\n\n // 从子组件中提取 NoMore\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child) && child.type === NoMore) {\n noMoreCount++\n if (noMoreCount > 1) {\n return\n }\n const childProps = child.props as NoMoreProps\n config = { ...childProps, visible: childProps.visible !== false }\n }\n })\n\n // Props 方式转换为配置(优先级低于子组件)\n if (props.showNoMore && !config) {\n config = {\n visible: true,\n text: props.noMoreText,\n style: props.noMoreStyle,\n children: props.renderNoMore?.()\n }\n }\n\n return config\n }, [children, props.showNoMore, props.noMoreText, props.noMoreStyle, props.renderNoMore])\n\n // Refresher 平台适配:H5 用 addImperativeTouchListeners\n const {\n scrollViewRefresherProps,\n scrollViewRefresherHandlers,\n h5RefresherProps,\n addImperativeTouchListeners,\n renderRefresherContent,\n } = useRefresher(\n refresherConfig,\n isH5 && refresherConfig && !supportsNativeRefresher ? 0 : renderOffset,\n useScrollElementMode\n ? (ev: TouchEvent) => (ev.target != null && contentWrapperRef.current?.contains(ev.target as Node)) ?? false\n : undefined\n )\n const refresherTeardownRef = React.useRef<(() => void) | null>(null)\n const addImperativeTouchListenersRef = React.useRef(addImperativeTouchListeners)\n addImperativeTouchListenersRef.current = addImperativeTouchListeners\n React.useEffect(() => () => {\n if (refresherTeardownRef.current) refresherTeardownRef.current()\n }, [])\n\n // H5 下拉刷新顶栏高度(默认 50px,来自 useRefresher)\n const refresherHeightForH5 = (isH5 && refresherConfig && !supportsNativeRefresher && refresherConfig.refresherEnabled !== false) ? DEFAULT_REFRESHER_HEIGHT : 0\n\n // 解析分组结构:StickySection、ListItem 为直接子组件,过滤 Refresher/NoMore\n const sections = React.useMemo(() => {\n const result: Array<{\n header: React.ReactElement | null\n items: React.ReactElement[]\n key: string\n }> = []\n const defaultItems: React.ReactElement[] = []\n React.Children.forEach(children, (child, idx) => {\n if (React.isValidElement(child) && child.type === StickySection) {\n const sectionProps = child.props as any\n let header: React.ReactElement | null = null\n const items: React.ReactElement[] = []\n React.Children.forEach(sectionProps.children, (subChild) => {\n if (React.isValidElement(subChild) && subChild.type === StickyHeader) header = subChild\n else if (React.isValidElement(subChild) && subChild.type === ListItem) items.push(subChild)\n })\n result.push({ header, items, key: child.key || String(idx) })\n } else if (React.isValidElement(child) && child.type === ListItem) {\n defaultItems.push(child)\n }\n })\n if (defaultItems.length > 0) {\n result.push({ header: null, items: defaultItems, key: 'default' })\n }\n return result\n }, [children])\n\n // 动态尺寸管理\n const estimatedSize = resolveItemSizeByIndex(0, defaultItemSize)\n\n // 计算总 item 数量(跨所有 section)\n const totalItemCount = React.useMemo(() => {\n return sections.reduce((sum, section) => sum + section.items.length, 0)\n }, [sections])\n\n // 存储元素引用(用于 ResizeObserver)\n const itemRefsRef = React.useRef<Map<number, HTMLElement | null>>(new Map())\n // 存储 header 元素引用(用于 ResizeObserver)\n const headerRefsRef = React.useRef<Map<number, HTMLElement | null>>(new Map())\n // 小程序端:已完成 SelectorQuery 测量的 item 索引集,避免 refCallback 重复触发测量导致无限循环\n const weappMeasuredItemsRef = React.useRef<Set<number>>(new Set())\n // 动态尺寸缓存更新版本:setItemSize 后递增,用于驱动 sectionOffsets/totalLength 与 item 定位重算\n const [sizeCacheVersion, setSizeCacheVersion] = React.useState(0)\n const sizeCacheRafRef = React.useRef<number | null>(null)\n // (measureScrollProtectRef 已移除:scrollTop + 内容变更同帧 setData 会与 scrollAnchoring\n // 冲突导致归顶;改由 scrollAnchoring=true 独立处理内容重排,无需显式传 scrollTop 保护)\n // 动态尺寸缓存\n const sizeCache = useItemSizeCache({\n isHorizontal,\n estimatedSize,\n itemCount: totalItemCount\n })\n\n // header 动态尺寸缓存(sectionIndex -> size)\n const headerSizeCacheRef = React.useRef<Map<number, number>>(new Map())\n\n // 滚动修正的可见起始索引\n const visibleStartIndexRef = React.useRef(0)\n\n // ScrollTop 修正(仅 H5):动高时尺寸变化自动修正 scrollTop\n const scrollCorrectionEnabled = !isWeapp && props.useResizeObserver === true\n const scrollCorrection = useScrollCorrection({\n enabled: scrollCorrectionEnabled,\n visibleStartIndexRef,\n setScrollOffset: (offsetOrUpdater) => {\n const newOffset = typeof offsetOrUpdater === 'function'\n ? offsetOrUpdater(renderOffset)\n : offsetOrUpdater\n updateRenderOffset(newOffset, true, 'scrollCorrection') // 程序性修正需同步到 ScrollView\n }\n })\n const scrollCorrectionRef = React.useRef(scrollCorrection)\n scrollCorrectionRef.current = scrollCorrection\n const onScrollRef = React.useRef(onScroll)\n onScrollRef.current = onScroll\n const onScrollToUpperRef = React.useRef(onScrollToUpper)\n onScrollToUpperRef.current = onScrollToUpper\n const onScrollToLowerRef = React.useRef(onScrollToLower)\n onScrollToLowerRef.current = onScrollToLower\n const thresholdRef = React.useRef({ upper: upperThreshold, lower: lowerThreshold })\n thresholdRef.current = { upper: upperThreshold, lower: lowerThreshold }\n const listContentLengthRef = React.useRef(0)\n const inUpperZoneRef = React.useRef(true)\n const inLowerZoneRef = React.useRef(false)\n\n // 小程序 + 动高(virtual-list 风格):测量变化后同帧重排,不做程序性 scrollTop 回拉。\n // 若用户正在滚动(惯性未结束),推迟到滚动停止后再触发,防止内容重排 + setData 同帧\n // 导致 WeChat scrollAnchoring 失效或传滞后位置造成归顶。\n const scheduleWeappDynamicReflow = React.useCallback(() => {\n if (!isWeapp || props.useResizeObserver !== true) return\n\n // 滚动中:仅标记为待处理,等 onScrollEnd / 200ms 超时触发\n if (isUserScrollingRef.current) {\n pendingWeappReflowRef.current = true\n return\n }\n\n if (sizeCacheRafRef.current != null) return\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n pendingWeappReflowRef.current = false\n setSizeCacheVersion((v) => v + 1)\n })\n }, [isWeapp, props.useResizeObserver])\n\n // 每次渲染时更新 ref,保证 setTimeout 闭包内拿到最新版本\n scheduleWeappDynamicReflowRef.current = scheduleWeappDynamicReflow\n\n // ResizeObserver(当启用动态测量时)\n const resizeObserver = useResizeObserver({\n enabled: props.useResizeObserver === true,\n isHorizontal,\n listId,\n selectorQueryScope: props.selectorQueryScope,\n onResize: (index, size) => {\n const oldSize = sizeCache.getItemSize(index)\n sizeCache.setItemSize(index, size)\n\n if (Math.abs(oldSize - size) >= 1) {\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }\n\n // 触发 ScrollTop 修正\n scrollCorrection.recordSizeChange(index, oldSize, size)\n\n // 小程序:延迟 onItemSizeChange,避免父组件重渲染导致 List remount\n // H5:直接回调\n if (isWeapp) {\n weappDeferItemSizeChange(index, size, props.onItemSizeChange)\n } else {\n props.onItemSizeChange?.(index, size)\n }\n }\n })\n\n // 嵌套滚动:内层高度变化上报\n const handleReportNestedHeightChange = React.useCallback((height: number, index: number) => {\n if (height <= 0) return\n const estimatedHeader = estimatedSize * 0.5\n const fullHeight = height + estimatedHeader\n const oldSize = sizeCache.getItemSize(index)\n if (Math.abs(oldSize - fullHeight) < 1) return\n sizeCache.setItemSize(index, fullHeight)\n scrollCorrection.recordSizeChange(index, oldSize, fullHeight)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }, [sizeCache, scrollCorrection, estimatedSize, isWeapp, props.useResizeObserver, scheduleWeappDynamicReflow])\n\n const getDefaultHeaderSize = React.useCallback(() => {\n const headerSize = normalizeSize(props.headerSize)\n if (headerSize != null) return headerSize\n return resolveItemSizeByIndex(0, defaultItemSize)\n }, [props.headerSize, resolveItemSizeByIndex, defaultItemSize, normalizeSize])\n\n // 获取 header 尺寸(支持动态测量)\n const getHeaderSize = React.useCallback((sectionIndex: number) => {\n if (props.useResizeObserver === true) {\n const cached = headerSizeCacheRef.current.get(sectionIndex)\n if (cached != null && cached > 0) return cached\n }\n return getDefaultHeaderSize()\n }, [props.useResizeObserver, getDefaultHeaderSize])\n\n const getItemSize = React.useCallback((index: number) => {\n if (props.useResizeObserver === true) {\n return sizeCache.getItemSize(index)\n }\n return resolveItemSizeByIndex(index, defaultItemSize)\n }, [props.useResizeObserver, sizeCache, resolveItemSizeByIndex, defaultItemSize])\n\n // 分组累积高度/宽度,sizeCacheVersion 变化时重算\n const sectionOffsets = React.useMemo(() => {\n const offsets: number[] = [0]\n let globalItemIndex = 0\n\n sections.forEach((section, sectionIdx) => {\n const headerSize = getHeaderSize(sectionIdx)\n const itemSizes = section.items.map((_, localIdx) => getItemSize(globalItemIndex + localIdx))\n const groupSize = (section.header ? headerSize : 0) +\n itemSizes.reduce((a, b) => a + b, 0) +\n Math.max(0, section.items.length) * space\n offsets.push(offsets[offsets.length - 1] + groupSize)\n globalItemIndex += section.items.length\n })\n return offsets\n }, [sections, space, getItemSize, getHeaderSize, sizeCacheVersion])\n\n // 外层虚拟滚动:可见分组\n const [startSection, endSection] = React.useMemo(() => {\n let start = 0; let end = sections.length - 1\n for (let i = 0; i < sections.length; i++) {\n if (sectionOffsets[i + 1] > renderOffset) {\n start = Math.max(0, i - cacheCount)\n break\n }\n }\n for (let i = start; i < sections.length; i++) {\n if (sectionOffsets[i] >= renderOffset + containerLength) {\n end = Math.min(sections.length - 1, i + cacheCount)\n break\n }\n }\n return [start, end]\n }, [renderOffset, containerLength, sectionOffsets, sections.length, cacheCount])\n\n // 视口内可见 item 的全局索引范围(供 onScrollIndex)\n const [visibleStartItem, visibleEndItem] = React.useMemo(() => {\n const viewportTop = renderOffset\n const viewportBottom = renderOffset + containerLength\n let firstVisible = -1\n let lastVisible = -1\n let globalIndex = 0\n\n for (let s = 0; s < sections.length; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize(s)\n const sectionStart = sectionOffsets[s] + (section.header ? headerSize : 0)\n let itemTop = sectionStart\n\n for (let i = 0; i < section.items.length; i++) {\n const itemSize = getItemSize(globalIndex)\n const itemBottom = itemTop + itemSize\n // 判断 item 本身(不含 space)是否与视口相交\n if (itemBottom > viewportTop && itemTop < viewportBottom) {\n if (firstVisible < 0) firstVisible = globalIndex\n lastVisible = globalIndex\n }\n // 下一个 item 的起始位置 = 当前 item 结束 + space\n itemTop = itemBottom + space\n globalIndex++\n }\n }\n\n if (firstVisible < 0 || lastVisible < 0) return [0, 0]\n return [firstVisible, lastVisible]\n }, [renderOffset, containerLength, sections, sectionOffsets, getHeaderSize, getItemSize, space])\n\n const lastVisibleRangeRef = React.useRef({ start: -1, end: -1 })\n React.useEffect(() => {\n if (props.onScrollIndex) {\n if (lastVisibleRangeRef.current.start !== visibleStartItem ||\n lastVisibleRangeRef.current.end !== visibleEndItem) {\n lastVisibleRangeRef.current = { start: visibleStartItem, end: visibleEndItem }\n props.onScrollIndex(visibleStartItem, visibleEndItem)\n }\n }\n }, [visibleStartItem, visibleEndItem, props.onScrollIndex])\n\n const handleScroll = React.useCallback((e: any) => {\n let newOffset: number\n if (e.detail) {\n newOffset = isHorizontal ? e.detail.scrollLeft : e.detail.scrollTop\n } else {\n newOffset = isHorizontal ? e.scrollLeft : e.scrollTop\n }\n\n const effectiveOffset = newOffset\n const currentThreshold = thresholdRef.current\n const { upper, lower } = currentThreshold\n // WeChat 小程序节点不具备 clientHeight/clientWidth,需显式回退到 containerLength state\n const rawContainerSize = containerRef.current\n ? (isHorizontal ? (containerRef.current as any).clientWidth : (containerRef.current as any).clientHeight)\n : null\n const currentContainerLength = (typeof rawContainerSize === 'number' && rawContainerSize > 0)\n ? rawContainerSize\n : containerLength\n const nowInUpper = effectiveOffset <= upper\n const currentContentLength = listContentLengthRef.current\n const nowInLower = currentContentLength > 0 && effectiveOffset + currentContainerLength >= currentContentLength - lower\n const diff = effectiveOffset - lastScrollTopRef.current\n scrollDiffListRef.current.shift()\n scrollDiffListRef.current.push(diff)\n const shaking = isScrollingRef.current && isShaking(scrollDiffListRef.current)\n if (shaking) {\n return\n }\n\n if (programmaticCooldownRef.current) {\n lastScrollTopRef.current = effectiveOffset\n setRenderOffset(effectiveOffset)\n const scrollTop = isHorizontal ? 0 : newOffset\n const scrollLeft = isHorizontal ? newOffset : 0\n onScroll?.({ scrollTop, scrollLeft, detail: { scrollTop, scrollLeft } })\n if (nowInUpper && !inUpperZoneRef.current) onScrollToUpperRef.current?.()\n if (nowInLower && !inLowerZoneRef.current) onScrollToLowerRef.current?.()\n inUpperZoneRef.current = nowInUpper\n inLowerZoneRef.current = nowInLower\n return\n }\n\n scrollCorrection.markUserScrolling()\n updateRenderOffset(effectiveOffset, false, 'onScroll')\n\n const scrollTop = isHorizontal ? 0 : newOffset\n const scrollLeft = isHorizontal ? newOffset : 0\n onScroll?.({ scrollTop, scrollLeft, detail: { scrollTop, scrollLeft } })\n if (nowInUpper && !inUpperZoneRef.current) onScrollToUpperRef.current?.()\n if (nowInLower && !inLowerZoneRef.current) onScrollToLowerRef.current?.()\n inUpperZoneRef.current = nowInUpper\n inLowerZoneRef.current = nowInLower\n }, [isHorizontal, onScroll, updateRenderOffset, scrollCorrection, props.useResizeObserver, containerLength])\n\n // 小程序:onScrollEnd 优先结束 isUserScrolling,timeout 兜底\n const handleNativeScrollEnd = React.useCallback(() => {\n if (isWeapp) {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n scrollTimeoutRef.current = null\n }\n if (isUserScrollingRef.current) {\n isScrollingRef.current = false\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // 滚动结束后触发期间被延迟的 reflow(item 首次测量触发)\n if (pendingWeappReflowRef.current) {\n scheduleWeappDynamicReflowRef.current()\n }\n }\n }\n onScrollEnd?.()\n }, [isWeapp, onScrollEnd])\n\n // 暴露 scrollRef 给父组件,供内层 List/WaterFlow 传入 scrollElement\n React.useLayoutEffect(() => {\n if (!scrollRefProp) return\n const el = useScrollElementMode ? effectiveScrollElement?.current : containerRef.current\n if (el) {\n scrollRefProp.current = el\n }\n }, [scrollRefProp, useScrollElementMode, effectiveScrollElement])\n\n // controlledScrollTop 变化时同步到 ScrollView\n React.useEffect(() => {\n if (typeof controlledScrollTop === 'number') {\n const sv = scrollViewOffsetRef.current\n const same = isWeapp && Math.abs(sv - controlledScrollTop) < 1\n if (same) {\n const intermediate = controlledScrollTop > 0 ? controlledScrollTop - 0.01 : 0.01\n setRenderOffset(intermediate)\n setScrollViewOffset(intermediate)\n requestAnimationFrame(() => {\n setRenderOffset(controlledScrollTop)\n setScrollViewOffset(controlledScrollTop)\n })\n } else {\n setRenderOffset(controlledScrollTop)\n setScrollViewOffset(controlledScrollTop)\n }\n lastScrollTopRef.current = controlledScrollTop\n programmaticScrollRef.current = true\n }\n }, [controlledScrollTop])\n\n // 清理定时器、ResizeObserver 与尺寸缓存 RAF(仅在卸载时执行)\n React.useEffect(() => {\n return () => {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n // 小程序端冷却期定时器清理\n if (isWeapp && programmaticCooldownTimerRef.current) {\n clearTimeout(programmaticCooldownTimerRef.current)\n }\n if (sizeCacheRafRef.current != null) {\n cancelAnimationFrame(sizeCacheRafRef.current)\n sizeCacheRafRef.current = null\n }\n resizeObserver.disconnect()\n scrollCorrection.clearQueue()\n }\n }, [])\n\n // scrollIntoView:仅当 scrollIntoView 变化时执行一次跳动,统一转换为 scrollTop 路径(updateRenderOffset)。\n const lastScrollIntoViewRef = React.useRef<string | null>(null)\n React.useEffect(() => {\n const targetId = props.scrollIntoView\n if (!targetId) {\n lastScrollIntoViewRef.current = null\n return\n }\n if (lastScrollIntoViewRef.current === targetId) return\n lastScrollIntoViewRef.current = targetId\n\n let targetIndex = -1\n if (targetId.startsWith('list-item-')) {\n targetIndex = parseInt(targetId.replace('list-item-', ''), 10)\n }\n\n if (targetIndex >= 0 && targetIndex < totalItemCount) {\n let targetOffset = 0\n let currentGlobalIndex = 0\n for (let s = 0; s < sections.length; s++) {\n const section = sections[s]\n const headerSize = section.header ? getHeaderSize(s) : 0\n if (currentGlobalIndex + section.items.length > targetIndex) {\n targetOffset += headerSize\n for (let i = 0; i < targetIndex - currentGlobalIndex; i++) {\n targetOffset += getItemSize(currentGlobalIndex + i) + space\n }\n break\n } else {\n targetOffset += headerSize\n for (let i = 0; i < section.items.length; i++) {\n targetOffset += getItemSize(currentGlobalIndex + i) + space\n }\n currentGlobalIndex += section.items.length\n }\n }\n const el = effectiveScrollElement?.current\n if (useScrollElementMode && el) {\n const scrollTarget = targetOffset + (isWeapp ? effectiveStartOffsetRef.current : effectiveStartOffset)\n if (isH5) {\n if (isHorizontal) {\n el.scrollTo({ left: scrollTarget })\n } else {\n el.scrollTo({ top: scrollTarget })\n }\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n } else if (isWeapp) {\n const scrollViewId = (el as any).id || `_ls_${listId}`\n if (!(el as any).id) (el as any).id = scrollViewId\n getScrollViewContextNode(`#${scrollViewId}`).then((node: any) => {\n if (isHorizontal) {\n node?.scrollTo?.({ left: scrollTarget, animated: false })\n } else {\n node?.scrollTo?.({ top: scrollTarget, animated: false })\n }\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n })\n } else {\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n }\n } else {\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n }\n }\n }, [props.scrollIntoView, totalItemCount, sections, getHeaderSize, getItemSize, space, updateRenderOffset, useScrollElementMode, effectiveScrollElement, effectiveStartOffset, effectiveStartOffsetRef, isH5, isWeapp, isHorizontal, listId])\n\n // 容器样式;H5 刷新中禁止滚动\n const containerStyle: React.CSSProperties = {\n position: 'relative',\n boxSizing: 'border-box',\n height,\n width,\n ...style,\n ...(isH5 && refresherConfig && !supportsNativeRefresher && h5RefresherProps.isRefreshing\n ? { overflow: 'hidden' as const }\n : {}),\n }\n\n // ScrollView 属性\n const scrollViewProps: Record<string, unknown> = {\n scrollY: !scrollX && scrollY,\n scrollX,\n style: containerStyle,\n className,\n enhanced: true,\n showScrollbar,\n upperThreshold,\n lowerThreshold,\n scrollWithAnimation: false,\n onScroll: handleScroll,\n onScrollStart,\n onScrollEnd: handleNativeScrollEnd,\n enableBackToTop,\n // 小程序端:开启滚动锚定,防止虚拟列表子节点通过 setData 更新时原生 scroll-view 重置滚动位置\n ...(isWeapp ? { scrollAnchoring: true } : {}),\n ...(typeof cacheExtent === 'number' ? { cacheExtent } : {}),\n\n ...scrollViewRefresherProps,\n ...scrollViewRefresherHandlers,\n }\n\n // H5 对齐小程序:refresherTriggered=true 时顶部立即显示加载指示器,滚到顶部并锁定滚动直至设为 false\n React.useEffect(() => {\n if (!isH5 || !refresherConfig || supportsNativeRefresher || !h5RefresherProps.isRefreshing) return\n updateRenderOffset(0, true, 'refresher')\n }, [h5RefresherProps.isRefreshing, isH5, refresherConfig, supportsNativeRefresher, updateRenderOffset])\n\n // H5 下拉刷新:ref 存 addImperativeTouchListeners,避免 config 变化导致 effect 循环\n React.useLayoutEffect(() => {\n const attach = addImperativeTouchListenersRef.current\n if (!attach) return\n let teardown: (() => void) | null = null\n const tryAttach = () => {\n const el = useScrollElementMode ? effectiveScrollElement?.current : containerRef.current\n if (el && !refresherTeardownRef.current) {\n teardown = attach(el)\n refresherTeardownRef.current = teardown\n }\n }\n tryAttach()\n const rafId = requestAnimationFrame(tryAttach)\n return () => {\n cancelAnimationFrame(rafId)\n if (teardown) {\n teardown()\n }\n refresherTeardownRef.current = null\n }\n }, [useScrollElementMode, effectiveScrollElement])\n\n scrollViewOffsetRef.current = scrollViewOffset\n // scrollTop 传递策略(对齐 virtual-list enhanced=true 的做法):\n // - 程序性滚动帧(programmaticScrollRef=true):传 scrollViewOffset(目标位置)\n // - 其余所有帧(用户滚动 / 测量重排 / 空闲):完全不传,依赖微信原生 + scrollAnchoring\n // scrollAnchoring=true 负责在内容重排时自动维持视口位置,避免与显式 scrollTop\n // 同帧冲突(冲突会导致 scrollAnchoring 失去锚点后归顶)\n if (isWeapp) {\n if (programmaticScrollRef.current) {\n // 程序性滚动(imperative / scrollCorrection / scrollIntoView 等):传目标位置\n if (isHorizontal) {\n scrollViewProps.scrollLeft = scrollViewOffset\n } else {\n scrollViewProps.scrollTop = scrollViewOffset\n }\n programmaticScrollRef.current = false\n }\n // else:用户滚动 / 空闲帧不传 scrollTop,让微信原生 + scrollAnchoring 完全接管\n } else {\n // H5:非用户滑动时传\n if (!isUserScrolling) {\n if (isHorizontal) {\n scrollViewProps.scrollLeft = scrollViewOffset\n } else {\n scrollViewProps.scrollTop = scrollViewOffset\n }\n }\n }\n\n // H5:程序性滚动时写回 DOM scrollTop\n React.useEffect(() => {\n if (!isH5) return\n if (isUserScrolling || !containerRef.current || typeof scrollViewOffset !== 'number') return\n if (!programmaticScrollRef.current) return\n const scrollValue = scrollViewOffset\n if (isHorizontal) {\n containerRef.current.scrollLeft = scrollValue\n } else {\n containerRef.current.scrollTop = scrollValue\n }\n programmaticScrollRef.current = false\n }, [isH5, scrollViewOffset, isHorizontal, isUserScrolling])\n\n // 总高度/宽度(含 NoMore)\n const noMoreHeight = noMoreConfig?.visible ? (noMoreConfig.height || 60) : 0\n const listContentLength = sectionOffsets[sectionOffsets.length - 1] + noMoreHeight\n const totalLength = listContentLength\n\n // scrollElement 模式下 onScrollToLower 需用内层内容高度判断,供 scroll handler 读取\n listContentLengthRef.current = listContentLength\n\n const scrollAttachRefsRef = React.useRef<ListScrollElementAttachRefs | null>(null)\n scrollAttachRefsRef.current = {\n scrollCorrection: scrollCorrectionRef.current,\n onScroll: onScrollRef.current,\n onScrollToUpper: onScrollToUpperRef.current,\n onScrollToLower: onScrollToLowerRef.current,\n threshold: thresholdRef.current,\n listContentLength: listContentLengthRef.current,\n }\n useListScrollElementAttach(\n useScrollElementMode && isH5,\n effectiveScrollElement,\n effectiveStartOffset,\n isHorizontal,\n setContainerLength,\n updateRenderOffset,\n scrollRefProp,\n scrollAttachRefsRef\n )\n useListScrollElementAttachWeapp(\n useScrollElementMode && isWeapp,\n effectiveScrollElement,\n effectiveStartOffsetRef,\n effectiveStartOffset,\n isHorizontal,\n setContainerLength,\n updateRenderOffset,\n scrollRefProp,\n scrollAttachRefsRef,\n initialContainerLength,\n props.selectorQueryScope\n )\n\n // 吸顶/吸左 header\n const stickyHeaderNode = React.useMemo(() => {\n if (!stickyHeader) return null\n for (let i = 0; i < sections.length; i++) {\n if (sectionOffsets[i] <= renderOffset && renderOffset < sectionOffsets[i + 1]) {\n const section = sections[i]\n if (section.header) {\n // 吸顶 header 不设固定 height/width,由内容撑开,避免「外部 60px 容器 + 实际内容 40+px」导致 header 内空白\n const stickyHeaderStyle: React.CSSProperties = {\n position: 'sticky',\n top: 0,\n left: 0,\n zIndex: 100,\n background: '#fff',\n boxSizing: 'border-box',\n minHeight: 20,\n overflow: 'hidden',\n lineHeight: 1\n }\n return (\n <View style={stickyHeaderStyle}>\n {section.header}\n </View>\n )\n }\n }\n }\n return null\n }, [stickyHeader, renderOffset, sectionOffsets, sections])\n\n // 渲染分组+item双层虚拟滚动\n const renderSections = () => {\n const nodes: React.ReactNode[] = []\n let offset = sectionOffsets[startSection]\n let globalItemIndex = 0 // 全局 item 索引(跨 section)\n\n // 计算起始 section 之前的所有 item 数量\n for (let s = 0; s < startSection; s++) {\n globalItemIndex += sections[s].items.length\n }\n\n for (let s = startSection; s <= endSection; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize(s)\n const itemSizes = section.items.map((_, i) => getItemSize(globalItemIndex + i))\n // header\n if (section.header) {\n const sectionIndex = s\n // 动态测量时外层定位容器不设固定高度,由内层撑开\n const sectionHeaderStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 2,\n boxSizing: 'border-box',\n width: '100%',\n minHeight: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal\n ? { top: 0, height: '100%', left: offset, width: props.useResizeObserver ? undefined : headerSize }\n : { top: offset, height: props.useResizeObserver ? undefined : headerSize })\n }\n\n // header ref 回调(用于 ResizeObserver 测量)\n const headerRefCallback = props.useResizeObserver ? (el: HTMLElement | null) => {\n if (el) {\n headerRefsRef.current.set(sectionIndex, el)\n resizeObserver.observe(el, -sectionIndex - 1) // 用负数索引区分 header 和 item\n const measureAndUpdateHeader = (measured: number) => {\n if (measured > 0) {\n const oldSize = headerSizeCacheRef.current.get(sectionIndex) ?? getDefaultHeaderSize()\n if (Math.abs(oldSize - measured) >= 1) {\n headerSizeCacheRef.current.set(sectionIndex, measured)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }\n }\n }\n if (isH5) {\n requestAnimationFrame(() => {\n if (!headerRefsRef.current.has(sectionIndex)) return\n const rect = el.getBoundingClientRect()\n measureAndUpdateHeader(isHorizontal ? rect.width : rect.height)\n })\n } else if (isWeapp) {\n Taro.nextTick(() => {\n if (!headerRefsRef.current.has(sectionIndex)) return\n createSelectorQueryScoped(props.selectorQueryScope)\n .select(`#${listId}-list-header-inner-${sectionIndex}`)\n .boundingClientRect((rect: any) => {\n if (rect) {\n measureAndUpdateHeader(isHorizontal ? rect.width : rect.height)\n }\n })\n .exec()\n })\n }\n } else {\n const oldEl = headerRefsRef.current.get(sectionIndex)\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n headerRefsRef.current.delete(sectionIndex)\n }\n }\n } : undefined\n\n // 动态尺寸时:外层定位,内层撑开以便测量\n const headerContentStyle: React.CSSProperties = props.useResizeObserver\n ? (\n isHorizontal\n // weapp 下 max-content 兼容性不稳定,改用 inline-flex 收缩包裹以测得真实宽度\n ? (isWeapp\n ? { boxSizing: 'border-box', display: 'inline-flex', height: '100%' }\n : { boxSizing: 'border-box', width: 'max-content', height: '100%' })\n : { boxSizing: 'border-box', width: '100%' }\n )\n : {}\n\n if (props.useResizeObserver) {\n const headerInnerProps: any = {\n ref: headerRefCallback,\n style: headerContentStyle,\n 'data-index': String(-sectionIndex - 1), // 用于 unobserve 获取 index;与 observe(el, -sectionIndex-1) 对应\n }\n if (isWeapp) {\n headerInnerProps.id = `${listId}-list-header-inner-${sectionIndex}`\n }\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, React.createElement(View, headerInnerProps, section.header))\n )\n } else {\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, section.header)\n )\n }\n offset += headerSize\n }\n // item offsets\n const itemOffsets = accumulate(itemSizes.map((size) => size + space))\n // 内层虚拟滚动:可见item区间\n let startItem = 0; let endItem = section.items.length - 1\n for (let i = 0; i < section.items.length; i++) {\n if (offset + itemOffsets[i + 1] > renderOffset) {\n startItem = Math.max(0, i - cacheCount)\n break\n }\n }\n for (let i = startItem; i < section.items.length; i++) {\n if (offset + itemOffsets[i] >= renderOffset + containerLength) {\n endItem = Math.min(section.items.length - 1, i + cacheCount)\n break\n }\n }\n\n // 更新可见起始索引(用于 ScrollCorrection)\n if (s === startSection && startItem === 0) {\n visibleStartIndexRef.current = globalItemIndex\n } else if (s === startSection) {\n visibleStartIndexRef.current = globalItemIndex + startItem\n }\n\n // 渲染可见item\n for (let i = startItem; i <= endItem; i++) {\n const currentGlobalIndex = globalItemIndex + i\n const itemId = `list-item-${currentGlobalIndex}`\n\n const sectionItemStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 1,\n boxSizing: 'border-box',\n width: '100%',\n minHeight: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal\n ? {\n top: 0,\n height: '100%',\n left: offset + itemOffsets[i],\n width: itemSizes[i],\n marginRight: space\n }\n : {\n top: offset + itemOffsets[i],\n height: itemSizes[i],\n marginBottom: space\n })\n }\n\n // ResizeObserver:绑定内层内容容器测量真实尺寸,尺寸变化时才 bump 版本\n const refCallback = (el: HTMLElement | null) => {\n if (el) {\n const capturedIndex = currentGlobalIndex\n itemRefsRef.current.set(capturedIndex, el)\n resizeObserver.observe(el, capturedIndex)\n\n // H5:使用 getBoundingClientRect 进行 fallback 测量\n // 小程序:使用 SelectorQuery 进行 fallback 测量(小程序没有 getBoundingClientRect)\n const measureAndUpdate = (measured: number) => {\n if (measured > 0) {\n const oldSize = sizeCache.getItemSize(capturedIndex)\n if (Math.abs(oldSize - measured) < 1) return\n sizeCache.setItemSize(capturedIndex, measured)\n scrollCorrection.recordSizeChange(capturedIndex, oldSize, measured)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n // 小程序:延迟 onItemSizeChange,避免父组件重渲染导致 List remount\n if (isWeapp) {\n weappDeferItemSizeChange(capturedIndex, measured, props.onItemSizeChange)\n } else {\n props.onItemSizeChange?.(capturedIndex, measured)\n }\n }\n }\n\n if (isH5) {\n requestAnimationFrame(() => {\n if (!itemRefsRef.current.has(capturedIndex)) return\n const rect = el.getBoundingClientRect()\n measureAndUpdate(isHorizontal ? rect.width : rect.height)\n })\n } else if (isWeapp) {\n // 小程序端:使用 SelectorQuery 测量内层内容容器的实际尺寸\n // 注意:必须选 inner 容器(无固定高度,由内容撑开),不能选 outer(有虚拟列表设置的固定高度)\n // 已测量过的 item 跳过,避免 refCallback 重复触发导致无限循环\n // 滚动期间跳过 SelectorQuery(不加入 weappMeasuredItemsRef),避免异步查询干扰 scroll-view\n // SelectorQuery 是只读查询,滚动期间执行安全\n if (shouldMeasureWeappItem(capturedIndex, weappMeasuredItemsRef.current)) {\n weappMeasuredItemsRef.current.add(capturedIndex)\n // 使用 Taro.nextTick 代替 setTimeout(50):等待下一帧渲染完成后再测量\n // 比固定延时更快(减少\"预估→实测\"闪烁)且更可靠(保证 DOM 已更新)\n Taro.nextTick(() => {\n if (!itemRefsRef.current.has(capturedIndex)) return\n createSelectorQueryScoped(props.selectorQueryScope)\n // 页面上可能同时存在多个 List,inner id 必须带 listId 前缀避免跨列表误命中\n .select(`#${listId}-list-item-inner-${capturedIndex}`)\n .boundingClientRect((rect: any) => {\n if (rect) {\n measureAndUpdate(isHorizontal ? rect.width : rect.height)\n }\n })\n .exec()\n })\n }\n }\n } else {\n const oldEl = itemRefsRef.current.get(currentGlobalIndex)\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n itemRefsRef.current.delete(currentGlobalIndex)\n }\n }\n }\n\n // 动态尺寸时:外层负责定位,内层由内容撑开以便测量真实尺寸。\n // 纵向:内层 width:100% 无 height,由内容撑开,测到的是内容高度。\n // 横向:width:max-content + height:100%:\n // - width:max-content 便于测量真实宽度;\n // - height:100% 让测量层与外层 slot 条带高度一致,避免「外层条带 180px、内层 wrapper 只有内容高度」导致的内外高度差。\n const contentWrapperStyle: React.CSSProperties = props.useResizeObserver\n ? (\n isHorizontal\n // weapp 下 max-content 兼容性不稳定,改用 inline-flex 收缩包裹以测得真实宽度\n ? (isWeapp\n ? { boxSizing: 'border-box', display: 'inline-flex', height: '100%' }\n : { boxSizing: 'border-box', width: 'max-content', height: '100%' })\n : { boxSizing: 'border-box', width: '100%' }\n )\n : {}\n\n const outerItemProps: any = {\n key: section.key + '-item-' + i,\n id: itemId,\n style: sectionItemStyle,\n }\n\n if (props.useResizeObserver) {\n const innerProps: any = {\n ref: refCallback,\n style: contentWrapperStyle,\n }\n // 小程序端需要 id 用于 SelectorQuery 测量内容真实尺寸;H5 端不需要(用 getBoundingClientRect)\n if (isWeapp) {\n // 页面内多 List 并存时避免 id 冲突(例如 demo 同页含多个 List)\n innerProps.id = `${listId}-list-item-inner-${currentGlobalIndex}`\n }\n innerProps['data-index'] = String(currentGlobalIndex)\n const itemNode = React.createElement(View, outerItemProps, React.createElement(View, innerProps, section.items[i]))\n // 任务 4.1:当 List 暴露 scrollRef 时,为每个 item 提供 Context,供内层 WaterFlow 使用\n const itemWithContext = scrollRefProp && !useScrollElementMode\n ? React.createElement(ScrollElementContextOrFallback.Provider, {\n key: outerItemProps.key,\n value: {\n scrollRef: scrollRefProp,\n containerHeight: containerLength,\n startOffset: offset + itemOffsets[i],\n reportNestedHeightChange: props.useResizeObserver\n ? (h: number) => handleReportNestedHeightChange(h, currentGlobalIndex)\n : undefined,\n },\n }, itemNode)\n : itemNode\n nodes.push(itemWithContext)\n } else {\n const itemNode = React.createElement(View, outerItemProps, section.items[i])\n const itemWithContext = scrollRefProp && !useScrollElementMode\n ? React.createElement(ScrollElementContextOrFallback.Provider, {\n key: outerItemProps.key,\n value: {\n scrollRef: scrollRefProp,\n containerHeight: containerLength,\n startOffset: offset + itemOffsets[i],\n reportNestedHeightChange: props.useResizeObserver\n ? (h: number) => handleReportNestedHeightChange(h, currentGlobalIndex)\n : undefined,\n },\n }, itemNode)\n : itemNode\n nodes.push(itemWithContext)\n }\n }\n\n globalItemIndex += section.items.length\n offset += itemOffsets[itemOffsets.length - 1]\n }\n\n return nodes\n }\n\n // 渲染 NoMore 内容\n const renderNoMoreContent = () => {\n if (!noMoreConfig || !noMoreConfig.visible) return null\n\n const noMoreHeightValue = noMoreConfig.height || 60\n const listContentEnd = sectionOffsets[sectionOffsets.length - 1]\n\n const defaultStyle: React.CSSProperties = {\n position: 'absolute',\n ...(isHorizontal\n ? { left: listContentEnd, top: 0, width: noMoreHeightValue, height: '100%' }\n : { top: listContentEnd, left: 0, width: '100%', height: noMoreHeightValue }\n ),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: '#999',\n fontSize: '14px',\n boxSizing: 'border-box',\n ...noMoreConfig.style\n }\n\n return (\n <View style={defaultStyle}>\n {noMoreConfig.children || noMoreConfig.text || '没有更多了'}\n </View>\n )\n }\n\n // 空列表场景:仅显示 NoMore\n if (sections.length === 0 && noMoreConfig?.visible) {\n return (\n <ScrollView ref={containerRef as any} {...scrollViewProps}>\n <View style={{\n minHeight: containerLength,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...containerStyle\n }}>\n {renderNoMoreContent()}\n </View>\n </ScrollView>\n )\n }\n\n // 可滚区域总尺寸\n // H5 refresher 用负 translateY 隐藏,有上方混排时可能延伸到 sibling 区域;overflow:hidden 裁剪避免重叠\n const needsRefresherClip = refresherHeightForH5 > 0\n const contentWrapperStyle: React.CSSProperties = isHorizontal\n ? { width: totalLength, position: 'relative', height: '100%', ...(needsRefresherClip && { overflow: 'hidden' }) }\n : { height: totalLength, position: 'relative', width: '100%', ...(needsRefresherClip && { overflow: 'hidden' }) }\n const listWrapperStyle: React.CSSProperties = isHorizontal\n ? { width: listContentLength, position: 'relative' as const, height: '100%' }\n : { height: listContentLength, position: 'relative' as const, width: '100%' }\n const pullTranslate: React.CSSProperties =\n refresherHeightForH5 > 0 && h5RefresherProps.pullDistance !== 0\n ? { transform: `translateY(${h5RefresherProps.pullDistance}px)` }\n : {}\n const h5RefresherTranslateY = -refresherHeightForH5 + h5RefresherProps.pullDistance\n\n // 内容区域渲染\n const renderContentArea = () => (\n <View style={contentWrapperStyle}>\n {refresherHeightForH5 > 0 ? (\n <>\n {/* H5 刷新层默认上移隐藏;下拉时按 pullDistance 同步露出 */}\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: refresherHeightForH5,\n zIndex: 0,\n transform: `translateY(${h5RefresherTranslateY}px)`,\n }}\n >\n {renderRefresherContent()}\n </View>\n {/* 列表在上方:zIndex 高盖住刷新层,下拉时 translateY 下移露出下面刷新内容 */}\n {/* 需要 background 遮住下方刷新层,因为 renderSections 是 absolute 定位不占流空间 */}\n <View style={{ ...listWrapperStyle, ...pullTranslate, zIndex: 1, background: style?.background ?? style?.backgroundColor ?? '#fff' }}>\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </View>\n </>\n ) : (\n <>\n {!supportsNativeRefresher && renderRefresherContent()}\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </>\n )}\n </View>\n )\n\n // useScrollElementMode 或 needAutoFind&&pending:渲染 View 以便监听外部滚动或 probe 阶段查找滚动父节点\n const renderView = useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending')\n if (renderView) {\n // 任务 2.4:恢复 refresher DOM 结构(refresher 层 + listWrapperStyle)\n return (\n <View ref={contentWrapperRef as any} id={contentId} style={contentWrapperStyle}>\n {refresherHeightForH5 > 0 ? (\n <>\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: refresherHeightForH5,\n zIndex: 0,\n transform: `translateY(${h5RefresherTranslateY}px)`,\n }}\n >\n {renderRefresherContent()}\n </View>\n <View style={{ ...listWrapperStyle, ...pullTranslate, zIndex: 1, background: style?.background ?? style?.backgroundColor ?? '#fff' }}>\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </View>\n </>\n ) : (\n <>\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </>\n )}\n </View>\n )\n }\n\n return (\n <ScrollView ref={containerRef as any} {...scrollViewProps} id={listId}>\n {/* 小程序:slot=\"refresher\" 必须是 ScrollView 的直接子元素 */}\n {supportsNativeRefresher && renderRefresherContent()}\n {renderContentArea()}\n </ScrollView>\n )\n}\n\nconst List = React.forwardRef<ListHandle, ListProps>(InnerList)\n\nexport { List, ListItem, NoMore, StickyHeader, StickySection }\n\nexport default List\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoGM,SAAU,UAAU,CAAC,GAAa,EAAA;AACtC,IAAA,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;AAClB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACnC,QAAA,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;;AAEpC,IAAA,OAAO,MAAM;AACf;AAEM,SAAU,SAAS,CAAC,QAAkB,EAAA;AAC1C,IAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;AACrC,IAAA,MAAM,KAAK,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AAC,UAAU,CAAwB,SAAS;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport Taro from '@tarojs/taro'\nimport React from 'react'\n\nimport { getScrollViewContextNode } from '../../utils'\nimport { ScrollElementContextOrFallback } from '../../utils/scrollElementContext'\nimport { useItemSizeCache } from './hooks/useItemSizeCache'\nimport { useListNestedScroll } from './hooks/useListNestedScroll'\nimport { type ListScrollElementAttachRefs, useListScrollElementAttach } from './hooks/useListScrollElementAttach'\nimport { useListScrollElementAttachWeapp } from './hooks/useListScrollElementAttachWeapp'\nimport { type ListRefresherConfig, useRefresher } from './hooks/useRefresher'\nimport { useResizeObserver } from './hooks/useResizeObserver'\nimport { useScrollCorrection } from './hooks/useScrollCorrection'\nimport ListItem from './ListItem'\nimport NoMore, { type NoMoreProps } from './NoMore'\nimport StickyHeader from './StickyHeader'\nimport StickySection from './StickySection'\nimport { createSelectorQueryScoped, isH5, isWeapp, supportsNativeRefresher } from './utils'\n\n/** 与官方 List.d.ts / ScrollView / harmony 对齐,不增减已有语义;扩展项仅用于高级能力 */\nexport interface ListProps {\n // ===== 与 ScrollView / List.d.ts 一致 =====\n showScrollbar?: boolean\n scrollTop?: number\n scrollX?: boolean\n scrollY?: boolean\n onScroll?: (e: { scrollTop: number, scrollLeft: number, detail: { scrollTop: number, scrollLeft: number } }) => void\n onScrollToUpper?: () => void\n onScrollToLower?: () => void\n upperThreshold?: number\n lowerThreshold?: number\n /** 与 ScrollView cacheExtent 对齐(视口外渲染距离),可选 */\n cacheExtent?: number\n /** 与 ScrollView enableBackToTop 对齐 */\n enableBackToTop?: boolean\n /** 与 ScrollView onScrollStart 对齐 */\n onScrollStart?: () => void\n /** 与 ScrollView onScrollEnd 对齐 */\n onScrollEnd?: () => void\n scrollIntoView?: string\n /** 透传给最外层 ScrollView 的 className,便于自定义样式 */\n className?: string\n\n // ===== 与 harmony-cpp ListProps / ListBuilder 对齐 =====\n stickyHeader?: boolean\n space?: number\n cacheCount?: number\n itemData?: any[]\n itemSize?: number | ((index: number, data?: any[]) => number)\n height?: number | string\n width?: number | string\n style?: React.CSSProperties\n children?: React.ReactNode\n /** Header 沿滚动方向尺寸;未传时回退到 itemSize */\n headerSize?: number\n\n // ===== 动态尺寸(与 type=\"dynamic\" 语义对齐)=====\n useResizeObserver?: boolean\n onItemSizeChange?: (index: number, size: number) => void\n\n // ===== NoMore 底部提示 =====\n showNoMore?: boolean\n noMoreText?: string\n noMoreStyle?: React.CSSProperties\n renderNoMore?: () => React.ReactNode\n\n // ===== 扩展:可见索引回调 =====\n onScrollIndex?: (start: number, end: number) => void\n\n // ===== 与 dynamic/harmony 对齐:List 自身可配置下拉刷新,无需 Refresher 子组件 =====\n /** 是否开启下拉刷新;与 Refresher 子组件二选一或同时存在(Refresher 子覆盖同名字段) */\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: 'black' | 'white' | 'none'\n refresherBackground?: string\n refresherTriggered?: boolean\n onRefresherPulling?: (e?: { detail?: { deltaY?: number } }) => void\n onRefresherRefresh?: () => void | Promise<void>\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n onRefresherWillRefresh?: () => void\n onRefresherStatusChange?: (e?: { detail?: { status?: number, dy?: number } }) => void\n\n /** 嵌套滚动:父级滚动,需 scrollElement 或 Context */\n nestedScroll?: boolean\n /** 父级滚动容器 ref */\n scrollElement?: React.RefObject<HTMLElement | null>\n /** 向外透出滚动容器,供子 List 作 scrollElement */\n scrollRef?: React.MutableRefObject<HTMLElement | null>\n /** 仅小程序:SelectorQuery / IO 作用域(如自定义组件内传 `this`),未传则沿用 page */\n selectorQueryScope?: object\n}\n\nexport interface ListHandle {\n scroll: (options?: {\n top?: number\n left?: number\n }) => void\n}\n\nexport function accumulate(arr: number[]) {\n const result = [0]\n for (let i = 0; i < arr.length; i++) {\n result[i + 1] = result[i] + arr[i]\n }\n return result\n}\n\nexport function isShaking(diffList: number[]): boolean {\n if (diffList.length < 3) return false\n const signs = diffList.map(diff => Math.sign(diff))\n let alternations = 0\n for (let i = 1; i < signs.length; i++) {\n if (signs[i] !== 0 && signs[i] !== signs[i - 1]) alternations++\n }\n return alternations >= 2\n}\n\n// 小程序端:判断 item 是否应该执行 SelectorQuery 测量(仅检查是否已测量过)\n// SelectorQuery 是只读查询,不会触发 setData,滚动期间执行是安全的\nfunction shouldMeasureWeappItem(index: number, measuredSet: Set<number>): boolean {\n return !measuredSet.has(index)\n}\n\n// 小程序端暂不外抛 onItemSizeChange,避免父层重渲染导致 List remount 引发回顶或空白\nfunction weappDeferItemSizeChange(_index: number, _size: number, _onItemSizeChange?: (index: number, size: number) => void) {}\n\n/** 向后兼容:ListScrollElementContext 已统一为 ScrollElementContext,无 Context 时兜底为 fallback */\nexport { ScrollElementContextOrFallback as ListScrollElementContext } from '../../utils/scrollElementContext'\n\n\n/** 从 scroll 选项解析目标偏移量 */\nfunction resolveScrollTargetOffset(\n options: { top?: number, left?: number } | undefined,\n isHorizontal: boolean\n): number {\n const opts = options ?? {}\n const top = typeof opts.top === 'number' ? opts.top : undefined\n const left = typeof opts.left === 'number' ? opts.left : undefined\n let result = 0\n if (isHorizontal) {\n if (typeof left === 'number') result = left\n else if (typeof top === 'number') result = top\n } else {\n if (typeof top === 'number') result = top\n else if (typeof left === 'number') result = left\n }\n return Number.isFinite(result) ? result : 0\n}\n\n// eslint-disable-next-line complexity -- List 多端/多模式逻辑集中,已抽离 useListNestedScroll、useListScrollElementAttach、resolveScrollTargetOffset 等\nconst InnerList = (props: ListProps, ref: React.Ref<ListHandle | null>) => {\n const {\n stickyHeader = false,\n space = 0,\n height = 400,\n width = '100%',\n showScrollbar = true,\n scrollTop: controlledScrollTop,\n scrollX = false,\n scrollY = true,\n onScroll,\n onScrollToUpper,\n onScrollToLower,\n onScrollStart,\n onScrollEnd,\n upperThreshold = 50,\n lowerThreshold = 50,\n cacheCount = 2,\n cacheExtent,\n enableBackToTop,\n className,\n style,\n children,\n nestedScroll,\n scrollElement,\n scrollRef: scrollRefProp,\n } = props\n\n const isHorizontal = scrollX === true\n const listType = nestedScroll === true ? 'nested' : 'default'\n const {\n effectiveScrollElement,\n effectiveStartOffset,\n effectiveStartOffsetRef,\n useScrollElementMode,\n needAutoFind,\n autoFindStatus,\n contentWrapperRef,\n contentId,\n } = useListNestedScroll(listType, scrollElement, undefined, isHorizontal, props.selectorQueryScope)\n const DEFAULT_ITEM_WIDTH = 120\n const DEFAULT_ITEM_HEIGHT = 40\n const defaultItemSize = isHorizontal ? DEFAULT_ITEM_WIDTH : DEFAULT_ITEM_HEIGHT\n\n const normalizeSize = React.useCallback((value: unknown): number | null => {\n if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) return null\n return value\n }, [])\n\n const resolveItemSizeByIndex = React.useCallback((index: number, fallback: number) => {\n const { itemSize, itemData } = props\n const numberSize = normalizeSize(itemSize)\n if (numberSize != null) return numberSize\n if (typeof itemSize === 'function') {\n const functionSize = normalizeSize(itemSize(index, itemData))\n if (functionSize != null) return functionSize\n }\n return fallback\n }, [props.itemSize, props.itemData, normalizeSize])\n\n // 滚动状态管理\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n // 生成唯一 List ID(用于小程序 ResizeObserver)\n const listId = React.useMemo(() => `list-${Math.random().toString(36).slice(2, 11)}`, [])\n\n // 渲染偏移量 - 用于计算应该渲染哪些元素\n const [renderOffset, setRenderOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 程序性滚动用的目标偏移;用户滑动期间不更新,避免与原生滚动冲突\n const [scrollViewOffset, setScrollViewOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 用户正在滑动时不再向 ScrollView 传 scrollTop,让滚动完全由原生接管\n const [isUserScrolling, setIsUserScrolling] = React.useState(false)\n // isUserScrolling 的 ref 镜像,供异步上下文读取最新值\n const isUserScrollingRef = React.useRef(false)\n\n const initialContainerLength = typeof (isHorizontal ? width : height) === 'number' ? (isHorizontal ? (width as number) : (height as number)) : 400\n const [containerLength, setContainerLength] = React.useState<number>(initialContainerLength)\n\n // 用容器实际尺寸更新视口长度,避免 props 与 CSS 不一致导致底部空白\n React.useEffect(() => {\n const el = containerRef.current\n if (!el || typeof ResizeObserver === 'undefined') return\n const ro = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { contentRect } = entry\n const measured = isHorizontal ? contentRect.width : contentRect.height\n if (measured > 0) setContainerLength(measured)\n }\n })\n ro.observe(el)\n return () => ro.disconnect()\n }, [isHorizontal])\n\n // WeChat 小程序:没有原生 ResizeObserver,用 SelectorQuery 一次性测量容器高度\n React.useEffect(() => {\n if (!isWeapp) return\n Taro.nextTick(() => {\n createSelectorQueryScoped(props.selectorQueryScope)\n .select(`#${listId}`)\n .boundingClientRect((rect: any) => {\n const measured = isHorizontal ? rect?.width : rect?.height\n if (typeof measured === 'number' && measured > 0) {\n setContainerLength(measured)\n }\n })\n .exec()\n })\n }, [isWeapp, isHorizontal, listId])\n\n // 滚动追踪相关refs\n const isScrollingRef = React.useRef(false)\n const lastScrollTopRef = React.useRef(controlledScrollTop ?? 0)\n const scrollDiffListRef = React.useRef<number[]>([0, 0, 0])\n const scrollTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n // H5:仅程序性滚动时写回 DOM scrollTop,用户滑动结束后不写回避免卡顿\n const programmaticScrollRef = React.useRef(false)\n // 小程序端程序性滚动冷却期:handleScroll 只更新 renderOffset,避免 scrollIntoView 后被原生回调拉回\n const programmaticCooldownRef = React.useRef(false)\n const programmaticCooldownTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const scrollViewOffsetRef = React.useRef(0)\n // 用户滚动期间挂起的 reflow 标记(用于滚动结束后补触发)\n const pendingWeappReflowRef = React.useRef(false)\n // ref 持有最新版 scheduleWeappDynamicReflow,供 updateRenderOffset 内的 setTimeout 闭包安全访问\n const scheduleWeappDynamicReflowRef = React.useRef(null as unknown as VoidFunction)\n // 处理渲染偏移量更新。\n // syncToScrollView=true:程序性滚动,立即同步 scrollViewOffset。\n // syncToScrollView=false:用户滑动,仅更新 renderOffset。weapp 采用 recycle-view 策略:不把用户滑动位置同步到 scrollViewOffset,避免「传滞后值拉回」和「从有到无归顶」。\n const updateRenderOffset = React.useCallback((newOffset: number, syncToScrollView?: boolean, source?: string) => {\n lastScrollTopRef.current = newOffset\n isScrollingRef.current = true\n\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n\n setRenderOffset(newOffset) // 始终更新虚拟列表用到的偏移\n\n if (syncToScrollView) {\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // 小程序:target===sv 时 ScrollView 认为无变化不滚动→白屏;imperative/scrollIntoView 时先传中间值再 RAF 传 target 强制触发\n // target=0 用 +0.01;target>0 用 -0.01(统一 +0.01 到底部会被 clamp 成同值无效)\n const same = isWeapp && Math.abs(scrollViewOffsetRef.current - newOffset) < 1\n const needForce = same && (source === 'imperative' || source === 'scrollIntoView')\n if (needForce) {\n const intermediate = newOffset > 0 ? newOffset - 0.01 : 0.01\n setScrollViewOffset(intermediate)\n programmaticScrollRef.current = true\n requestAnimationFrame(() => {\n // 第二帧也需要标记为程序性滚动,否则 else 分支不会传 scrollTop\n programmaticScrollRef.current = true\n setScrollViewOffset(newOffset)\n })\n } else {\n setScrollViewOffset(newOffset)\n }\n programmaticScrollRef.current = true\n if (isWeapp) {\n programmaticCooldownRef.current = true\n if (programmaticCooldownTimerRef.current) {\n clearTimeout(programmaticCooldownTimerRef.current)\n }\n programmaticCooldownTimerRef.current = setTimeout(() => {\n programmaticCooldownRef.current = false\n }, 500)\n }\n } else {\n isUserScrollingRef.current = true\n setIsUserScrolling(true)\n }\n\n scrollTimeoutRef.current = setTimeout(() => {\n isScrollingRef.current = false\n if (!syncToScrollView) {\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // weapp recycle-view 策略:用户滑动结束后不同步 scrollViewOffset,保持 pass 的值不变,避免 从有到无 归顶\n if (!isWeapp) {\n setScrollViewOffset(lastScrollTopRef.current)\n }\n // 滚动结束后触发期间被延迟的 reflow(item 首次测量触发)\n if (isWeapp && pendingWeappReflowRef.current) {\n scheduleWeappDynamicReflowRef.current()\n }\n }\n }, isWeapp ? 200 : 150)\n }, [])\n\n // 暴露给外部的实例方法:通过 ref.scroll({ top / left }) 进行程序性滚动\n React.useImperativeHandle(\n ref,\n () => ({\n scroll(options) {\n const targetOffset = resolveScrollTargetOffset(options, isHorizontal)\n const el = effectiveScrollElement?.current\n if (el && isH5) {\n const scrollTarget = targetOffset + effectiveStartOffset\n if (isHorizontal) {\n el.scrollTo({ left: scrollTarget })\n } else {\n el.scrollTo({ top: scrollTarget })\n }\n updateRenderOffset(targetOffset, false, 'scrollElement')\n } else if (el && isWeapp && useScrollElementMode) {\n // 小程序 scrollElement 模式:需通过 getScrollViewContextNode + node.scrollTo 真正滚动外部 scroll-view\n // updateRenderOffset 必须在 scrollTo 之后调用,否则 getScrollViewContextNode 异步期间会先更新 renderOffset 导致闪一下\n const startOff = effectiveStartOffsetRef.current\n const scrollTarget = targetOffset + startOff\n const scrollViewId = (el as any).id || `_ls_${listId}`\n if (!(el as any).id) (el as any).id = scrollViewId\n getScrollViewContextNode(`#${scrollViewId}`).then((node: any) => {\n if (isHorizontal) {\n node?.scrollTo?.({ left: scrollTarget, animated: false })\n } else {\n node?.scrollTo?.({ top: scrollTarget, animated: false })\n }\n updateRenderOffset(targetOffset, true, 'imperative')\n })\n } else {\n updateRenderOffset(targetOffset, true, 'imperative')\n }\n },\n }),\n [scrollX, effectiveScrollElement, effectiveStartOffset, effectiveStartOffsetRef, isH5, isWeapp, isHorizontal, listId, useScrollElementMode, updateRenderOffset]\n )\n\n // 提取 Refresher 配置(List 属性为 base,Refresher 子组件覆盖)\n const refresherConfig = React.useMemo((): ListRefresherConfig | null => {\n const listRefresherEnabled = props.refresherEnabled !== false && (\n props.refresherEnabled === true || props.onRefresherRefresh != null\n )\n const baseFromList: ListRefresherConfig | null = listRefresherEnabled\n ? {\n refresherEnabled: props.refresherEnabled,\n refresherThreshold: props.refresherThreshold,\n refresherDefaultStyle: props.refresherDefaultStyle,\n refresherBackground: props.refresherBackground,\n refresherTriggered: props.refresherTriggered,\n onRefresherPulling: props.onRefresherPulling,\n onRefresherRefresh: props.onRefresherRefresh,\n onRefresherRestore: props.onRefresherRestore,\n onRefresherAbort: props.onRefresherAbort,\n onRefresherWillRefresh: props.onRefresherWillRefresh,\n onRefresherStatusChange: props.onRefresherStatusChange,\n }\n : null\n\n const isRefresherComponent = (child: React.ReactElement): boolean => {\n const type = child.type as any\n return type?.displayName === 'Refresher' || type?.name === 'Refresher'\n }\n\n let refresherChildProps: ListRefresherConfig | null = null\n let refresherCount = 0\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child) && isRefresherComponent(child)) {\n refresherCount++\n if (refresherCount > 1) {\n return\n }\n refresherChildProps = child.props as ListRefresherConfig\n }\n })\n\n if (refresherChildProps != null) {\n const base = baseFromList ?? {}\n // Refresher 子组件的配置覆盖 List 的配置\n return {\n ...base,\n ...refresherChildProps,\n } as ListRefresherConfig\n }\n return baseFromList\n }, [\n children,\n props.refresherEnabled,\n props.refresherThreshold,\n props.refresherDefaultStyle,\n props.refresherBackground,\n props.refresherTriggered,\n props.onRefresherPulling,\n props.onRefresherRefresh,\n props.onRefresherRestore,\n props.onRefresherAbort,\n props.onRefresherWillRefresh,\n props.onRefresherStatusChange,\n ])\n\n // 提取 NoMore 配置\n const noMoreConfig = React.useMemo(() => {\n let config: NoMoreProps | null = null\n let noMoreCount = 0\n\n // 从子组件中提取 NoMore\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child) && child.type === NoMore) {\n noMoreCount++\n if (noMoreCount > 1) {\n return\n }\n const childProps = child.props as NoMoreProps\n config = { ...childProps, visible: childProps.visible !== false }\n }\n })\n\n // Props 方式转换为配置(优先级低于子组件)\n if (props.showNoMore && !config) {\n config = {\n visible: true,\n text: props.noMoreText,\n style: props.noMoreStyle,\n children: props.renderNoMore?.()\n }\n }\n\n return config\n }, [children, props.showNoMore, props.noMoreText, props.noMoreStyle, props.renderNoMore])\n\n // Refresher 平台适配:H5 用 addImperativeTouchListeners\n const {\n scrollViewRefresherProps,\n scrollViewRefresherHandlers,\n h5RefresherProps,\n addImperativeTouchListeners,\n renderRefresherContent,\n slotHeight: h5RefresherSlotHeight,\n } = useRefresher(\n refresherConfig,\n isH5 && refresherConfig && !supportsNativeRefresher ? 0 : renderOffset,\n useScrollElementMode\n ? (ev: TouchEvent) => (ev.target != null && contentWrapperRef.current?.contains(ev.target as Node)) ?? false\n : undefined,\n !!(isH5 && refresherConfig && !supportsNativeRefresher && refresherConfig.refresherEnabled !== false)\n )\n const refresherTeardownRef = React.useRef<(() => void) | null>(null)\n const addImperativeTouchListenersRef = React.useRef(addImperativeTouchListeners)\n addImperativeTouchListenersRef.current = addImperativeTouchListeners\n React.useEffect(() => () => {\n if (refresherTeardownRef.current) refresherTeardownRef.current()\n }, [])\n\n // H5 下拉刷新顶栏高度:自定义内容由 useRefresher 内 ResizeObserver 测量,否则默认 50\n const refresherHeightForH5 = (isH5 && refresherConfig && !supportsNativeRefresher && refresherConfig.refresherEnabled !== false)\n ? h5RefresherSlotHeight\n : 0\n\n // 解析分组结构:StickySection、ListItem 为直接子组件,过滤 Refresher/NoMore\n const sections = React.useMemo(() => {\n const result: Array<{\n header: React.ReactElement | null\n items: React.ReactElement[]\n key: string\n }> = []\n const defaultItems: React.ReactElement[] = []\n React.Children.forEach(children, (child, idx) => {\n if (React.isValidElement(child) && child.type === StickySection) {\n const sectionProps = child.props as any\n let header: React.ReactElement | null = null\n const items: React.ReactElement[] = []\n React.Children.forEach(sectionProps.children, (subChild) => {\n if (React.isValidElement(subChild) && subChild.type === StickyHeader) header = subChild\n else if (React.isValidElement(subChild) && subChild.type === ListItem) items.push(subChild)\n })\n result.push({ header, items, key: child.key || String(idx) })\n } else if (React.isValidElement(child) && child.type === ListItem) {\n defaultItems.push(child)\n }\n })\n if (defaultItems.length > 0) {\n result.push({ header: null, items: defaultItems, key: 'default' })\n }\n return result\n }, [children])\n\n // 动态尺寸管理\n const estimatedSize = resolveItemSizeByIndex(0, defaultItemSize)\n\n // 计算总 item 数量(跨所有 section)\n const totalItemCount = React.useMemo(() => {\n return sections.reduce((sum, section) => sum + section.items.length, 0)\n }, [sections])\n\n // 存储元素引用(用于 ResizeObserver)\n const itemRefsRef = React.useRef<Map<number, HTMLElement | null>>(new Map())\n // 存储 header 元素引用(用于 ResizeObserver)\n const headerRefsRef = React.useRef<Map<number, HTMLElement | null>>(new Map())\n // 小程序端:已完成 SelectorQuery 测量的 item 索引集,避免 refCallback 重复触发测量导致无限循环\n const weappMeasuredItemsRef = React.useRef<Set<number>>(new Set())\n // 动态尺寸缓存更新版本:setItemSize 后递增,用于驱动 sectionOffsets/totalLength 与 item 定位重算\n const [sizeCacheVersion, setSizeCacheVersion] = React.useState(0)\n const sizeCacheRafRef = React.useRef<number | null>(null)\n // (measureScrollProtectRef 已移除:scrollTop + 内容变更同帧 setData 会与 scrollAnchoring\n // 冲突导致归顶;改由 scrollAnchoring=true 独立处理内容重排,无需显式传 scrollTop 保护)\n // 动态尺寸缓存\n const sizeCache = useItemSizeCache({\n isHorizontal,\n estimatedSize,\n itemCount: totalItemCount\n })\n\n // header 动态尺寸缓存(sectionIndex -> size)\n const headerSizeCacheRef = React.useRef<Map<number, number>>(new Map())\n\n // 滚动修正的可见起始索引\n const visibleStartIndexRef = React.useRef(0)\n\n // ScrollTop 修正(仅 H5):动高时尺寸变化自动修正 scrollTop\n const scrollCorrectionEnabled = !isWeapp && props.useResizeObserver === true\n const scrollCorrection = useScrollCorrection({\n enabled: scrollCorrectionEnabled,\n visibleStartIndexRef,\n setScrollOffset: (offsetOrUpdater) => {\n const newOffset = typeof offsetOrUpdater === 'function'\n ? offsetOrUpdater(renderOffset)\n : offsetOrUpdater\n updateRenderOffset(newOffset, true, 'scrollCorrection') // 程序性修正需同步到 ScrollView\n }\n })\n const scrollCorrectionRef = React.useRef(scrollCorrection)\n scrollCorrectionRef.current = scrollCorrection\n const onScrollRef = React.useRef(onScroll)\n onScrollRef.current = onScroll\n const onScrollToUpperRef = React.useRef(onScrollToUpper)\n onScrollToUpperRef.current = onScrollToUpper\n const onScrollToLowerRef = React.useRef(onScrollToLower)\n onScrollToLowerRef.current = onScrollToLower\n const thresholdRef = React.useRef({ upper: upperThreshold, lower: lowerThreshold })\n thresholdRef.current = { upper: upperThreshold, lower: lowerThreshold }\n const listContentLengthRef = React.useRef(0)\n const inUpperZoneRef = React.useRef(true)\n const inLowerZoneRef = React.useRef(false)\n\n // 小程序 + 动高(virtual-list 风格):测量变化后同帧重排,不做程序性 scrollTop 回拉。\n // 若用户正在滚动(惯性未结束),推迟到滚动停止后再触发,防止内容重排 + setData 同帧\n // 导致 WeChat scrollAnchoring 失效或传滞后位置造成归顶。\n const scheduleWeappDynamicReflow = React.useCallback(() => {\n if (!isWeapp || props.useResizeObserver !== true) return\n\n // 滚动中:仅标记为待处理,等 onScrollEnd / 200ms 超时触发\n if (isUserScrollingRef.current) {\n pendingWeappReflowRef.current = true\n return\n }\n\n if (sizeCacheRafRef.current != null) return\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n pendingWeappReflowRef.current = false\n setSizeCacheVersion((v) => v + 1)\n })\n }, [isWeapp, props.useResizeObserver])\n\n // 每次渲染时更新 ref,保证 setTimeout 闭包内拿到最新版本\n scheduleWeappDynamicReflowRef.current = scheduleWeappDynamicReflow\n\n // ResizeObserver(当启用动态测量时)\n const resizeObserver = useResizeObserver({\n enabled: props.useResizeObserver === true,\n isHorizontal,\n listId,\n selectorQueryScope: props.selectorQueryScope,\n onResize: (index, size) => {\n const oldSize = sizeCache.getItemSize(index)\n sizeCache.setItemSize(index, size)\n\n if (Math.abs(oldSize - size) >= 1) {\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }\n\n // 触发 ScrollTop 修正\n scrollCorrection.recordSizeChange(index, oldSize, size)\n\n // 小程序:延迟 onItemSizeChange,避免父组件重渲染导致 List remount\n // H5:直接回调\n if (isWeapp) {\n weappDeferItemSizeChange(index, size, props.onItemSizeChange)\n } else {\n props.onItemSizeChange?.(index, size)\n }\n }\n })\n\n // 嵌套滚动:内层高度变化上报\n const handleReportNestedHeightChange = React.useCallback((height: number, index: number) => {\n if (height <= 0) return\n const estimatedHeader = estimatedSize * 0.5\n const fullHeight = height + estimatedHeader\n const oldSize = sizeCache.getItemSize(index)\n if (Math.abs(oldSize - fullHeight) < 1) return\n sizeCache.setItemSize(index, fullHeight)\n scrollCorrection.recordSizeChange(index, oldSize, fullHeight)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }, [sizeCache, scrollCorrection, estimatedSize, isWeapp, props.useResizeObserver, scheduleWeappDynamicReflow])\n\n const getDefaultHeaderSize = React.useCallback(() => {\n const headerSize = normalizeSize(props.headerSize)\n if (headerSize != null) return headerSize\n return resolveItemSizeByIndex(0, defaultItemSize)\n }, [props.headerSize, resolveItemSizeByIndex, defaultItemSize, normalizeSize])\n\n // 获取 header 尺寸(支持动态测量)\n const getHeaderSize = React.useCallback((sectionIndex: number) => {\n if (props.useResizeObserver === true) {\n const cached = headerSizeCacheRef.current.get(sectionIndex)\n if (cached != null && cached > 0) return cached\n }\n return getDefaultHeaderSize()\n }, [props.useResizeObserver, getDefaultHeaderSize])\n\n const getItemSize = React.useCallback((index: number) => {\n if (props.useResizeObserver === true) {\n return sizeCache.getItemSize(index)\n }\n return resolveItemSizeByIndex(index, defaultItemSize)\n }, [props.useResizeObserver, sizeCache, resolveItemSizeByIndex, defaultItemSize])\n\n // 分组累积高度/宽度,sizeCacheVersion 变化时重算\n const sectionOffsets = React.useMemo(() => {\n const offsets: number[] = [0]\n let globalItemIndex = 0\n\n sections.forEach((section, sectionIdx) => {\n const headerSize = getHeaderSize(sectionIdx)\n const itemSizes = section.items.map((_, localIdx) => getItemSize(globalItemIndex + localIdx))\n const groupSize = (section.header ? headerSize : 0) +\n itemSizes.reduce((a, b) => a + b, 0) +\n Math.max(0, section.items.length) * space\n offsets.push(offsets[offsets.length - 1] + groupSize)\n globalItemIndex += section.items.length\n })\n return offsets\n }, [sections, space, getItemSize, getHeaderSize, sizeCacheVersion])\n\n // 外层虚拟滚动:可见分组\n const [startSection, endSection] = React.useMemo(() => {\n let start = 0; let end = sections.length - 1\n for (let i = 0; i < sections.length; i++) {\n if (sectionOffsets[i + 1] > renderOffset) {\n start = Math.max(0, i - cacheCount)\n break\n }\n }\n for (let i = start; i < sections.length; i++) {\n if (sectionOffsets[i] >= renderOffset + containerLength) {\n end = Math.min(sections.length - 1, i + cacheCount)\n break\n }\n }\n return [start, end]\n }, [renderOffset, containerLength, sectionOffsets, sections.length, cacheCount])\n\n // 视口内可见 item 的全局索引范围(供 onScrollIndex)\n const [visibleStartItem, visibleEndItem] = React.useMemo(() => {\n const viewportTop = renderOffset\n const viewportBottom = renderOffset + containerLength\n let firstVisible = -1\n let lastVisible = -1\n let globalIndex = 0\n\n for (let s = 0; s < sections.length; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize(s)\n const sectionStart = sectionOffsets[s] + (section.header ? headerSize : 0)\n let itemTop = sectionStart\n\n for (let i = 0; i < section.items.length; i++) {\n const itemSize = getItemSize(globalIndex)\n const itemBottom = itemTop + itemSize\n // 判断 item 本身(不含 space)是否与视口相交\n if (itemBottom > viewportTop && itemTop < viewportBottom) {\n if (firstVisible < 0) firstVisible = globalIndex\n lastVisible = globalIndex\n }\n // 下一个 item 的起始位置 = 当前 item 结束 + space\n itemTop = itemBottom + space\n globalIndex++\n }\n }\n\n if (firstVisible < 0 || lastVisible < 0) return [0, 0]\n return [firstVisible, lastVisible]\n }, [renderOffset, containerLength, sections, sectionOffsets, getHeaderSize, getItemSize, space])\n\n const lastVisibleRangeRef = React.useRef({ start: -1, end: -1 })\n React.useEffect(() => {\n if (props.onScrollIndex) {\n if (lastVisibleRangeRef.current.start !== visibleStartItem ||\n lastVisibleRangeRef.current.end !== visibleEndItem) {\n lastVisibleRangeRef.current = { start: visibleStartItem, end: visibleEndItem }\n props.onScrollIndex(visibleStartItem, visibleEndItem)\n }\n }\n }, [visibleStartItem, visibleEndItem, props.onScrollIndex])\n\n const handleScroll = React.useCallback((e: any) => {\n let newOffset: number\n if (e.detail) {\n newOffset = isHorizontal ? e.detail.scrollLeft : e.detail.scrollTop\n } else {\n newOffset = isHorizontal ? e.scrollLeft : e.scrollTop\n }\n\n const effectiveOffset = newOffset\n const currentThreshold = thresholdRef.current\n const { upper, lower } = currentThreshold\n // WeChat 小程序节点不具备 clientHeight/clientWidth,需显式回退到 containerLength state\n const rawContainerSize = containerRef.current\n ? (isHorizontal ? (containerRef.current as any).clientWidth : (containerRef.current as any).clientHeight)\n : null\n const currentContainerLength = (typeof rawContainerSize === 'number' && rawContainerSize > 0)\n ? rawContainerSize\n : containerLength\n const nowInUpper = effectiveOffset <= upper\n const currentContentLength = listContentLengthRef.current\n const nowInLower = currentContentLength > 0 && effectiveOffset + currentContainerLength >= currentContentLength - lower\n const diff = effectiveOffset - lastScrollTopRef.current\n scrollDiffListRef.current.shift()\n scrollDiffListRef.current.push(diff)\n const shaking = isScrollingRef.current && isShaking(scrollDiffListRef.current)\n if (shaking) {\n return\n }\n\n if (programmaticCooldownRef.current) {\n lastScrollTopRef.current = effectiveOffset\n setRenderOffset(effectiveOffset)\n const scrollTop = isHorizontal ? 0 : newOffset\n const scrollLeft = isHorizontal ? newOffset : 0\n onScroll?.({ scrollTop, scrollLeft, detail: { scrollTop, scrollLeft } })\n if (nowInUpper && !inUpperZoneRef.current) onScrollToUpperRef.current?.()\n if (nowInLower && !inLowerZoneRef.current) onScrollToLowerRef.current?.()\n inUpperZoneRef.current = nowInUpper\n inLowerZoneRef.current = nowInLower\n return\n }\n\n scrollCorrection.markUserScrolling()\n updateRenderOffset(effectiveOffset, false, 'onScroll')\n\n const scrollTop = isHorizontal ? 0 : newOffset\n const scrollLeft = isHorizontal ? newOffset : 0\n onScroll?.({ scrollTop, scrollLeft, detail: { scrollTop, scrollLeft } })\n if (nowInUpper && !inUpperZoneRef.current) onScrollToUpperRef.current?.()\n if (nowInLower && !inLowerZoneRef.current) onScrollToLowerRef.current?.()\n inUpperZoneRef.current = nowInUpper\n inLowerZoneRef.current = nowInLower\n }, [isHorizontal, onScroll, updateRenderOffset, scrollCorrection, props.useResizeObserver, containerLength])\n\n // 小程序:onScrollEnd 优先结束 isUserScrolling,timeout 兜底\n const handleNativeScrollEnd = React.useCallback(() => {\n if (isWeapp) {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n scrollTimeoutRef.current = null\n }\n if (isUserScrollingRef.current) {\n isScrollingRef.current = false\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // 滚动结束后触发期间被延迟的 reflow(item 首次测量触发)\n if (pendingWeappReflowRef.current) {\n scheduleWeappDynamicReflowRef.current()\n }\n }\n }\n onScrollEnd?.()\n }, [isWeapp, onScrollEnd])\n\n // 暴露 scrollRef 给父组件,供内层 List/WaterFlow 传入 scrollElement\n React.useLayoutEffect(() => {\n if (!scrollRefProp) return\n const el = useScrollElementMode ? effectiveScrollElement?.current : containerRef.current\n if (el) {\n scrollRefProp.current = el\n }\n }, [scrollRefProp, useScrollElementMode, effectiveScrollElement])\n\n // controlledScrollTop 变化时同步到 ScrollView\n React.useEffect(() => {\n if (typeof controlledScrollTop === 'number') {\n const sv = scrollViewOffsetRef.current\n const same = isWeapp && Math.abs(sv - controlledScrollTop) < 1\n if (same) {\n const intermediate = controlledScrollTop > 0 ? controlledScrollTop - 0.01 : 0.01\n setRenderOffset(intermediate)\n setScrollViewOffset(intermediate)\n requestAnimationFrame(() => {\n setRenderOffset(controlledScrollTop)\n setScrollViewOffset(controlledScrollTop)\n })\n } else {\n setRenderOffset(controlledScrollTop)\n setScrollViewOffset(controlledScrollTop)\n }\n lastScrollTopRef.current = controlledScrollTop\n programmaticScrollRef.current = true\n }\n }, [controlledScrollTop])\n\n // 清理定时器、ResizeObserver 与尺寸缓存 RAF(仅在卸载时执行)\n React.useEffect(() => {\n return () => {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n // 小程序端冷却期定时器清理\n if (isWeapp && programmaticCooldownTimerRef.current) {\n clearTimeout(programmaticCooldownTimerRef.current)\n }\n if (sizeCacheRafRef.current != null) {\n cancelAnimationFrame(sizeCacheRafRef.current)\n sizeCacheRafRef.current = null\n }\n resizeObserver.disconnect()\n scrollCorrection.clearQueue()\n }\n }, [])\n\n // scrollIntoView:仅当 scrollIntoView 变化时执行一次跳动,统一转换为 scrollTop 路径(updateRenderOffset)。\n const lastScrollIntoViewRef = React.useRef<string | null>(null)\n React.useEffect(() => {\n const targetId = props.scrollIntoView\n if (!targetId) {\n lastScrollIntoViewRef.current = null\n return\n }\n if (lastScrollIntoViewRef.current === targetId) return\n lastScrollIntoViewRef.current = targetId\n\n let targetIndex = -1\n if (targetId.startsWith('list-item-')) {\n targetIndex = parseInt(targetId.replace('list-item-', ''), 10)\n }\n\n if (targetIndex >= 0 && targetIndex < totalItemCount) {\n let targetOffset = 0\n let currentGlobalIndex = 0\n for (let s = 0; s < sections.length; s++) {\n const section = sections[s]\n const headerSize = section.header ? getHeaderSize(s) : 0\n if (currentGlobalIndex + section.items.length > targetIndex) {\n targetOffset += headerSize\n for (let i = 0; i < targetIndex - currentGlobalIndex; i++) {\n targetOffset += getItemSize(currentGlobalIndex + i) + space\n }\n break\n } else {\n targetOffset += headerSize\n for (let i = 0; i < section.items.length; i++) {\n targetOffset += getItemSize(currentGlobalIndex + i) + space\n }\n currentGlobalIndex += section.items.length\n }\n }\n const el = effectiveScrollElement?.current\n if (useScrollElementMode && el) {\n const scrollTarget = targetOffset + (isWeapp ? effectiveStartOffsetRef.current : effectiveStartOffset)\n if (isH5) {\n if (isHorizontal) {\n el.scrollTo({ left: scrollTarget })\n } else {\n el.scrollTo({ top: scrollTarget })\n }\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n } else if (isWeapp) {\n const scrollViewId = (el as any).id || `_ls_${listId}`\n if (!(el as any).id) (el as any).id = scrollViewId\n getScrollViewContextNode(`#${scrollViewId}`).then((node: any) => {\n if (isHorizontal) {\n node?.scrollTo?.({ left: scrollTarget, animated: false })\n } else {\n node?.scrollTo?.({ top: scrollTarget, animated: false })\n }\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n })\n } else {\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n }\n } else {\n updateRenderOffset(targetOffset, true, 'scrollIntoView')\n }\n }\n }, [props.scrollIntoView, totalItemCount, sections, getHeaderSize, getItemSize, space, updateRenderOffset, useScrollElementMode, effectiveScrollElement, effectiveStartOffset, effectiveStartOffsetRef, isH5, isWeapp, isHorizontal, listId])\n\n // 容器样式;H5 刷新中禁止滚动\n const containerStyle: React.CSSProperties = {\n position: 'relative',\n boxSizing: 'border-box',\n height,\n width,\n ...style,\n ...(isH5 && refresherConfig && !supportsNativeRefresher && h5RefresherProps.isRefreshing\n ? { overflow: 'hidden' as const }\n : {}),\n }\n\n // ScrollView 属性\n const scrollViewProps: Record<string, unknown> = {\n scrollY: !scrollX && scrollY,\n scrollX,\n style: containerStyle,\n className,\n enhanced: true,\n showScrollbar,\n upperThreshold,\n lowerThreshold,\n scrollWithAnimation: false,\n onScroll: handleScroll,\n onScrollStart,\n onScrollEnd: handleNativeScrollEnd,\n enableBackToTop,\n // 小程序端:开启滚动锚定,防止虚拟列表子节点通过 setData 更新时原生 scroll-view 重置滚动位置\n ...(isWeapp ? { scrollAnchoring: true } : {}),\n ...(typeof cacheExtent === 'number' ? { cacheExtent } : {}),\n\n ...scrollViewRefresherProps,\n ...scrollViewRefresherHandlers,\n }\n\n // H5 对齐小程序:refresherTriggered=true 时顶部立即显示加载指示器,滚到顶部并锁定滚动直至设为 false\n React.useEffect(() => {\n if (!isH5 || !refresherConfig || supportsNativeRefresher || !h5RefresherProps.isRefreshing) return\n updateRenderOffset(0, true, 'refresher')\n }, [h5RefresherProps.isRefreshing, isH5, refresherConfig, supportsNativeRefresher, updateRenderOffset])\n\n // H5 下拉刷新:ref 存 addImperativeTouchListeners,避免 config 变化导致 effect 循环\n React.useLayoutEffect(() => {\n const attach = addImperativeTouchListenersRef.current\n if (!attach) return\n let teardown: (() => void) | null = null\n const tryAttach = () => {\n const el = useScrollElementMode ? effectiveScrollElement?.current : containerRef.current\n if (el && !refresherTeardownRef.current) {\n teardown = attach(el)\n refresherTeardownRef.current = teardown\n }\n }\n tryAttach()\n const rafId = requestAnimationFrame(tryAttach)\n return () => {\n cancelAnimationFrame(rafId)\n if (teardown) {\n teardown()\n }\n refresherTeardownRef.current = null\n }\n }, [useScrollElementMode, effectiveScrollElement])\n\n scrollViewOffsetRef.current = scrollViewOffset\n // scrollTop 传递策略(对齐 virtual-list enhanced=true 的做法):\n // - 程序性滚动帧(programmaticScrollRef=true):传 scrollViewOffset(目标位置)\n // - 其余所有帧(用户滚动 / 测量重排 / 空闲):完全不传,依赖微信原生 + scrollAnchoring\n // scrollAnchoring=true 负责在内容重排时自动维持视口位置,避免与显式 scrollTop\n // 同帧冲突(冲突会导致 scrollAnchoring 失去锚点后归顶)\n if (isWeapp) {\n if (programmaticScrollRef.current) {\n // 程序性滚动(imperative / scrollCorrection / scrollIntoView 等):传目标位置\n if (isHorizontal) {\n scrollViewProps.scrollLeft = scrollViewOffset\n } else {\n scrollViewProps.scrollTop = scrollViewOffset\n }\n programmaticScrollRef.current = false\n }\n // else:用户滚动 / 空闲帧不传 scrollTop,让微信原生 + scrollAnchoring 完全接管\n } else {\n // H5:非用户滑动时传\n if (!isUserScrolling) {\n if (isHorizontal) {\n scrollViewProps.scrollLeft = scrollViewOffset\n } else {\n scrollViewProps.scrollTop = scrollViewOffset\n }\n }\n }\n\n // H5:程序性滚动时写回 DOM scrollTop\n React.useEffect(() => {\n if (!isH5) return\n if (isUserScrolling || !containerRef.current || typeof scrollViewOffset !== 'number') return\n if (!programmaticScrollRef.current) return\n const scrollValue = scrollViewOffset\n if (isHorizontal) {\n containerRef.current.scrollLeft = scrollValue\n } else {\n containerRef.current.scrollTop = scrollValue\n }\n programmaticScrollRef.current = false\n }, [isH5, scrollViewOffset, isHorizontal, isUserScrolling])\n\n // 总高度/宽度(含 NoMore)\n const noMoreHeight = noMoreConfig?.visible ? (noMoreConfig.height || 60) : 0\n const listContentLength = sectionOffsets[sectionOffsets.length - 1] + noMoreHeight\n const totalLength = listContentLength\n\n // scrollElement 模式下 onScrollToLower 需用内层内容高度判断,供 scroll handler 读取\n listContentLengthRef.current = listContentLength\n\n const scrollAttachRefsRef = React.useRef<ListScrollElementAttachRefs | null>(null)\n scrollAttachRefsRef.current = {\n scrollCorrection: scrollCorrectionRef.current,\n onScroll: onScrollRef.current,\n onScrollToUpper: onScrollToUpperRef.current,\n onScrollToLower: onScrollToLowerRef.current,\n threshold: thresholdRef.current,\n listContentLength: listContentLengthRef.current,\n }\n useListScrollElementAttach(\n useScrollElementMode && isH5,\n effectiveScrollElement,\n effectiveStartOffset,\n isHorizontal,\n setContainerLength,\n updateRenderOffset,\n scrollRefProp,\n scrollAttachRefsRef\n )\n useListScrollElementAttachWeapp(\n useScrollElementMode && isWeapp,\n effectiveScrollElement,\n effectiveStartOffsetRef,\n effectiveStartOffset,\n isHorizontal,\n setContainerLength,\n updateRenderOffset,\n scrollRefProp,\n scrollAttachRefsRef,\n initialContainerLength,\n props.selectorQueryScope\n )\n\n // 吸顶/吸左 header\n const stickyHeaderNode = React.useMemo(() => {\n if (!stickyHeader) return null\n for (let i = 0; i < sections.length; i++) {\n if (sectionOffsets[i] <= renderOffset && renderOffset < sectionOffsets[i + 1]) {\n const section = sections[i]\n if (section.header) {\n // 吸顶 header 不设固定 height/width,由内容撑开,避免「外部 60px 容器 + 实际内容 40+px」导致 header 内空白\n const stickyHeaderStyle: React.CSSProperties = {\n position: 'sticky',\n top: 0,\n left: 0,\n zIndex: 100,\n background: '#fff',\n boxSizing: 'border-box',\n minHeight: 20,\n overflow: 'hidden',\n lineHeight: 1\n }\n return (\n <View style={stickyHeaderStyle}>\n {section.header}\n </View>\n )\n }\n }\n }\n return null\n }, [stickyHeader, renderOffset, sectionOffsets, sections])\n\n // 渲染分组+item双层虚拟滚动\n const renderSections = () => {\n const nodes: React.ReactNode[] = []\n let offset = sectionOffsets[startSection]\n let globalItemIndex = 0 // 全局 item 索引(跨 section)\n\n // 计算起始 section 之前的所有 item 数量\n for (let s = 0; s < startSection; s++) {\n globalItemIndex += sections[s].items.length\n }\n\n for (let s = startSection; s <= endSection; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize(s)\n const itemSizes = section.items.map((_, i) => getItemSize(globalItemIndex + i))\n // header\n if (section.header) {\n const sectionIndex = s\n // 动态测量时外层定位容器不设固定高度,由内层撑开\n const sectionHeaderStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 2,\n boxSizing: 'border-box',\n width: '100%',\n minHeight: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal\n ? { top: 0, height: '100%', left: offset, width: props.useResizeObserver ? undefined : headerSize }\n : { top: offset, height: props.useResizeObserver ? undefined : headerSize })\n }\n\n // header ref 回调(用于 ResizeObserver 测量)\n const headerRefCallback = props.useResizeObserver ? (el: HTMLElement | null) => {\n if (el) {\n headerRefsRef.current.set(sectionIndex, el)\n resizeObserver.observe(el, -sectionIndex - 1) // 用负数索引区分 header 和 item\n const measureAndUpdateHeader = (measured: number) => {\n if (measured > 0) {\n const oldSize = headerSizeCacheRef.current.get(sectionIndex) ?? getDefaultHeaderSize()\n if (Math.abs(oldSize - measured) >= 1) {\n headerSizeCacheRef.current.set(sectionIndex, measured)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }\n }\n }\n if (isH5) {\n requestAnimationFrame(() => {\n if (!headerRefsRef.current.has(sectionIndex)) return\n const rect = el.getBoundingClientRect()\n measureAndUpdateHeader(isHorizontal ? rect.width : rect.height)\n })\n } else if (isWeapp) {\n Taro.nextTick(() => {\n if (!headerRefsRef.current.has(sectionIndex)) return\n createSelectorQueryScoped(props.selectorQueryScope)\n .select(`#${listId}-list-header-inner-${sectionIndex}`)\n .boundingClientRect((rect: any) => {\n if (rect) {\n measureAndUpdateHeader(isHorizontal ? rect.width : rect.height)\n }\n })\n .exec()\n })\n }\n } else {\n const oldEl = headerRefsRef.current.get(sectionIndex)\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n headerRefsRef.current.delete(sectionIndex)\n }\n }\n } : undefined\n\n // 动态尺寸时:外层定位,内层撑开以便测量\n const headerContentStyle: React.CSSProperties = props.useResizeObserver\n ? (\n isHorizontal\n // weapp 下 max-content 兼容性不稳定,改用 inline-flex 收缩包裹以测得真实宽度\n ? (isWeapp\n ? { boxSizing: 'border-box', display: 'inline-flex', height: '100%' }\n : { boxSizing: 'border-box', width: 'max-content', height: '100%' })\n : { boxSizing: 'border-box', width: '100%' }\n )\n : {}\n\n if (props.useResizeObserver) {\n const headerInnerProps: any = {\n ref: headerRefCallback,\n style: headerContentStyle,\n 'data-index': String(-sectionIndex - 1), // 用于 unobserve 获取 index;与 observe(el, -sectionIndex-1) 对应\n }\n if (isWeapp) {\n headerInnerProps.id = `${listId}-list-header-inner-${sectionIndex}`\n }\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, React.createElement(View, headerInnerProps, section.header))\n )\n } else {\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, section.header)\n )\n }\n offset += headerSize\n }\n // item offsets\n const itemOffsets = accumulate(itemSizes.map((size) => size + space))\n // 内层虚拟滚动:可见item区间\n let startItem = 0; let endItem = section.items.length - 1\n for (let i = 0; i < section.items.length; i++) {\n if (offset + itemOffsets[i + 1] > renderOffset) {\n startItem = Math.max(0, i - cacheCount)\n break\n }\n }\n for (let i = startItem; i < section.items.length; i++) {\n if (offset + itemOffsets[i] >= renderOffset + containerLength) {\n endItem = Math.min(section.items.length - 1, i + cacheCount)\n break\n }\n }\n\n // 更新可见起始索引(用于 ScrollCorrection)\n if (s === startSection && startItem === 0) {\n visibleStartIndexRef.current = globalItemIndex\n } else if (s === startSection) {\n visibleStartIndexRef.current = globalItemIndex + startItem\n }\n\n // 渲染可见item\n for (let i = startItem; i <= endItem; i++) {\n const currentGlobalIndex = globalItemIndex + i\n const itemId = `list-item-${currentGlobalIndex}`\n\n const sectionItemStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 1,\n boxSizing: 'border-box',\n width: '100%',\n minHeight: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal\n ? {\n top: 0,\n height: '100%',\n left: offset + itemOffsets[i],\n width: itemSizes[i],\n marginRight: space\n }\n : {\n top: offset + itemOffsets[i],\n height: itemSizes[i],\n marginBottom: space\n })\n }\n\n // ResizeObserver:绑定内层内容容器测量真实尺寸,尺寸变化时才 bump 版本\n const refCallback = (el: HTMLElement | null) => {\n if (el) {\n const capturedIndex = currentGlobalIndex\n itemRefsRef.current.set(capturedIndex, el)\n resizeObserver.observe(el, capturedIndex)\n\n // H5:使用 getBoundingClientRect 进行 fallback 测量\n // 小程序:使用 SelectorQuery 进行 fallback 测量(小程序没有 getBoundingClientRect)\n const measureAndUpdate = (measured: number) => {\n if (measured > 0) {\n const oldSize = sizeCache.getItemSize(capturedIndex)\n if (Math.abs(oldSize - measured) < 1) return\n sizeCache.setItemSize(capturedIndex, measured)\n scrollCorrection.recordSizeChange(capturedIndex, oldSize, measured)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n // 小程序:延迟 onItemSizeChange,避免父组件重渲染导致 List remount\n if (isWeapp) {\n weappDeferItemSizeChange(capturedIndex, measured, props.onItemSizeChange)\n } else {\n props.onItemSizeChange?.(capturedIndex, measured)\n }\n }\n }\n\n if (isH5) {\n requestAnimationFrame(() => {\n if (!itemRefsRef.current.has(capturedIndex)) return\n const rect = el.getBoundingClientRect()\n measureAndUpdate(isHorizontal ? rect.width : rect.height)\n })\n } else if (isWeapp) {\n // 小程序端:使用 SelectorQuery 测量内层内容容器的实际尺寸\n // 注意:必须选 inner 容器(无固定高度,由内容撑开),不能选 outer(有虚拟列表设置的固定高度)\n // 已测量过的 item 跳过,避免 refCallback 重复触发导致无限循环\n // 滚动期间跳过 SelectorQuery(不加入 weappMeasuredItemsRef),避免异步查询干扰 scroll-view\n // SelectorQuery 是只读查询,滚动期间执行安全\n if (shouldMeasureWeappItem(capturedIndex, weappMeasuredItemsRef.current)) {\n weappMeasuredItemsRef.current.add(capturedIndex)\n // 使用 Taro.nextTick 代替 setTimeout(50):等待下一帧渲染完成后再测量\n // 比固定延时更快(减少\"预估→实测\"闪烁)且更可靠(保证 DOM 已更新)\n Taro.nextTick(() => {\n if (!itemRefsRef.current.has(capturedIndex)) return\n createSelectorQueryScoped(props.selectorQueryScope)\n // 页面上可能同时存在多个 List,inner id 必须带 listId 前缀避免跨列表误命中\n .select(`#${listId}-list-item-inner-${capturedIndex}`)\n .boundingClientRect((rect: any) => {\n if (rect) {\n measureAndUpdate(isHorizontal ? rect.width : rect.height)\n }\n })\n .exec()\n })\n }\n }\n } else {\n const oldEl = itemRefsRef.current.get(currentGlobalIndex)\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n itemRefsRef.current.delete(currentGlobalIndex)\n }\n }\n }\n\n // 动态尺寸时:外层负责定位,内层由内容撑开以便测量真实尺寸。\n // 纵向:内层 width:100% 无 height,由内容撑开,测到的是内容高度。\n // 横向:width:max-content + height:100%:\n // - width:max-content 便于测量真实宽度;\n // - height:100% 让测量层与外层 slot 条带高度一致,避免「外层条带 180px、内层 wrapper 只有内容高度」导致的内外高度差。\n const contentWrapperStyle: React.CSSProperties = props.useResizeObserver\n ? (\n isHorizontal\n // weapp 下 max-content 兼容性不稳定,改用 inline-flex 收缩包裹以测得真实宽度\n ? (isWeapp\n ? { boxSizing: 'border-box', display: 'inline-flex', height: '100%' }\n : { boxSizing: 'border-box', width: 'max-content', height: '100%' })\n : { boxSizing: 'border-box', width: '100%' }\n )\n : {}\n\n const outerItemProps: any = {\n key: section.key + '-item-' + i,\n id: itemId,\n style: sectionItemStyle,\n }\n\n if (props.useResizeObserver) {\n const innerProps: any = {\n ref: refCallback,\n style: contentWrapperStyle,\n }\n // 小程序端需要 id 用于 SelectorQuery 测量内容真实尺寸;H5 端不需要(用 getBoundingClientRect)\n if (isWeapp) {\n // 页面内多 List 并存时避免 id 冲突(例如 demo 同页含多个 List)\n innerProps.id = `${listId}-list-item-inner-${currentGlobalIndex}`\n }\n innerProps['data-index'] = String(currentGlobalIndex)\n const itemNode = React.createElement(View, outerItemProps, React.createElement(View, innerProps, section.items[i]))\n // 任务 4.1:当 List 暴露 scrollRef 时,为每个 item 提供 Context,供内层 WaterFlow 使用\n const itemWithContext = scrollRefProp && !useScrollElementMode\n ? React.createElement(ScrollElementContextOrFallback.Provider, {\n key: outerItemProps.key,\n value: {\n scrollRef: scrollRefProp,\n containerHeight: containerLength,\n startOffset: offset + itemOffsets[i],\n reportNestedHeightChange: props.useResizeObserver\n ? (h: number) => handleReportNestedHeightChange(h, currentGlobalIndex)\n : undefined,\n },\n }, itemNode)\n : itemNode\n nodes.push(itemWithContext)\n } else {\n const itemNode = React.createElement(View, outerItemProps, section.items[i])\n const itemWithContext = scrollRefProp && !useScrollElementMode\n ? React.createElement(ScrollElementContextOrFallback.Provider, {\n key: outerItemProps.key,\n value: {\n scrollRef: scrollRefProp,\n containerHeight: containerLength,\n startOffset: offset + itemOffsets[i],\n reportNestedHeightChange: props.useResizeObserver\n ? (h: number) => handleReportNestedHeightChange(h, currentGlobalIndex)\n : undefined,\n },\n }, itemNode)\n : itemNode\n nodes.push(itemWithContext)\n }\n }\n\n globalItemIndex += section.items.length\n offset += itemOffsets[itemOffsets.length - 1]\n }\n\n return nodes\n }\n\n // 渲染 NoMore 内容\n const renderNoMoreContent = () => {\n if (!noMoreConfig || !noMoreConfig.visible) return null\n\n const noMoreHeightValue = noMoreConfig.height || 60\n const listContentEnd = sectionOffsets[sectionOffsets.length - 1]\n\n const defaultStyle: React.CSSProperties = {\n position: 'absolute',\n ...(isHorizontal\n ? { left: listContentEnd, top: 0, width: noMoreHeightValue, height: '100%' }\n : { top: listContentEnd, left: 0, width: '100%', height: noMoreHeightValue }\n ),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: '#999',\n fontSize: '14px',\n boxSizing: 'border-box',\n ...noMoreConfig.style\n }\n\n return (\n <View style={defaultStyle}>\n {noMoreConfig.children || noMoreConfig.text || '没有更多了'}\n </View>\n )\n }\n\n // 空列表场景:仅显示 NoMore\n if (sections.length === 0 && noMoreConfig?.visible) {\n return (\n <ScrollView ref={containerRef as any} {...scrollViewProps}>\n <View style={{\n minHeight: containerLength,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...containerStyle\n }}>\n {renderNoMoreContent()}\n </View>\n </ScrollView>\n )\n }\n\n // 可滚区域总尺寸\n // H5 refresher 用负 translateY 隐藏,有上方混排时可能延伸到 sibling 区域;overflow:hidden 裁剪避免重叠\n const needsRefresherClip = refresherHeightForH5 > 0\n const contentWrapperStyle: React.CSSProperties = isHorizontal\n ? { width: totalLength, position: 'relative', height: '100%', ...(needsRefresherClip && { overflow: 'hidden' }) }\n : { height: totalLength, position: 'relative', width: '100%', ...(needsRefresherClip && { overflow: 'hidden' }) }\n const listWrapperStyle: React.CSSProperties = isHorizontal\n ? { width: listContentLength, position: 'relative' as const, height: '100%' }\n : { height: listContentLength, position: 'relative' as const, width: '100%' }\n const pullTranslate: React.CSSProperties =\n refresherHeightForH5 > 0 && h5RefresherProps.pullDistance !== 0\n ? { transform: `translateY(${h5RefresherProps.pullDistance}px)` }\n : {}\n const h5RefresherTranslateY = -refresherHeightForH5 + h5RefresherProps.pullDistance\n\n // 内容区域渲染\n const renderContentArea = () => (\n <View style={contentWrapperStyle}>\n {refresherHeightForH5 > 0 ? (\n <>\n {/* H5 刷新层默认上移隐藏;下拉时按 pullDistance 同步露出 */}\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: refresherHeightForH5,\n zIndex: 0,\n transform: `translateY(${h5RefresherTranslateY}px)`,\n }}\n >\n {renderRefresherContent()}\n </View>\n {/* 列表在上方:zIndex 高盖住刷新层,下拉时 translateY 下移露出下面刷新内容 */}\n {/* 需要 background 遮住下方刷新层,因为 renderSections 是 absolute 定位不占流空间 */}\n <View style={{ ...listWrapperStyle, ...pullTranslate, zIndex: 1, background: style?.background ?? style?.backgroundColor ?? '#fff' }}>\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </View>\n </>\n ) : (\n <>\n {!supportsNativeRefresher && renderRefresherContent()}\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </>\n )}\n </View>\n )\n\n // useScrollElementMode 或 needAutoFind&&pending:渲染 View 以便监听外部滚动或 probe 阶段查找滚动父节点\n const renderView = useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending')\n if (renderView) {\n // 任务 2.4:恢复 refresher DOM 结构(refresher 层 + listWrapperStyle)\n return (\n <View ref={contentWrapperRef as any} id={contentId} style={contentWrapperStyle}>\n {refresherHeightForH5 > 0 ? (\n <>\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: refresherHeightForH5,\n zIndex: 0,\n transform: `translateY(${h5RefresherTranslateY}px)`,\n }}\n >\n {renderRefresherContent()}\n </View>\n <View style={{ ...listWrapperStyle, ...pullTranslate, zIndex: 1, background: style?.background ?? style?.backgroundColor ?? '#fff' }}>\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </View>\n </>\n ) : (\n <>\n {stickyHeaderNode}\n {renderSections()}\n {renderNoMoreContent()}\n </>\n )}\n </View>\n )\n }\n\n return (\n <ScrollView ref={containerRef as any} {...scrollViewProps} id={listId}>\n {/* 小程序:slot=\"refresher\" 必须是 ScrollView 的直接子元素 */}\n {supportsNativeRefresher && renderRefresherContent()}\n {renderContentArea()}\n </ScrollView>\n )\n}\n\nconst List = React.forwardRef<ListHandle, ListProps>(InnerList)\n\nexport { List, ListItem, NoMore, StickyHeader, StickySection }\n\nexport default List\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoGM,SAAU,UAAU,CAAC,GAAa,EAAA;AACtC,IAAA,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;AAClB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACnC,QAAA,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;;AAEpC,IAAA,OAAO,MAAM;AACf;AAEM,SAAU,SAAS,CAAC,QAAkB,EAAA;AAC1C,IAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;AACrC,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnD,IAA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AC;AAEK,MAAA,IAAI,GAAG,KAAK,CAAC,UAAU,CAAwB,SAAS;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components-advanced",
3
- "version": "4.1.12-beta.35",
3
+ "version": "4.1.12-beta.37",
4
4
  "description": "",
5
5
  "author": "O2Team",
6
6
  "license": "MIT",
@@ -20,20 +20,20 @@
20
20
  "csstype": "^3.1.1",
21
21
  "memoize-one": "^6.0.0",
22
22
  "tslib": "^2.6.2",
23
- "@tarojs/components": "4.1.12-beta.35",
24
- "@tarojs/components-react": "4.1.12-beta.35"
23
+ "@tarojs/components": "4.1.12-beta.37",
24
+ "@tarojs/components-react": "4.1.12-beta.37"
25
25
  },
26
26
  "devDependencies": {
27
27
  "vue": "3.2.47",
28
- "@tarojs/runtime": "4.1.12-beta.35",
29
- "@tarojs/shared": "4.1.12-beta.35",
30
- "@tarojs/taro": "4.1.12-beta.35"
28
+ "@tarojs/runtime": "4.1.12-beta.37",
29
+ "@tarojs/shared": "4.1.12-beta.37",
30
+ "@tarojs/taro": "4.1.12-beta.37"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=18",
34
- "@tarojs/runtime": "~4.1.12-beta.35",
35
- "@tarojs/shared": "~4.1.12-beta.35",
36
- "@tarojs/taro": "~4.1.12-beta.35"
34
+ "@tarojs/taro": "~4.1.12-beta.37",
35
+ "@tarojs/runtime": "~4.1.12-beta.37",
36
+ "@tarojs/shared": "~4.1.12-beta.37"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "react": {