@tarojs/components-advanced 4.1.12-beta.12 → 4.1.12-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/list/hooks/useItemSizeCache.d.ts +1 -1
- package/dist/components/list/hooks/useItemSizeCache.js +5 -5
- package/dist/components/list/hooks/useItemSizeCache.js.map +1 -1
- package/dist/components/list/index.d.ts +2 -5
- package/dist/components/list/index.js +59 -56
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/water-flow/index.d.ts +1 -1
- package/dist/components/water-flow/interface.d.ts +4 -0
- package/dist/components/water-flow/water-flow.d.ts +2 -3
- package/dist/components/water-flow/water-flow.js +13 -4
- package/dist/components/water-flow/water-flow.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef, useCallback } from 'react';
|
|
2
2
|
|
|
3
3
|
function useItemSizeCache(options) {
|
|
4
|
-
const {
|
|
4
|
+
const { estimatedSize } = options;
|
|
5
5
|
// 缓存 Map:key = 索引,value = 尺寸信息
|
|
6
6
|
const cacheRef = useRef(new Map());
|
|
7
7
|
/**
|
|
@@ -13,8 +13,8 @@ function useItemSizeCache(options) {
|
|
|
13
13
|
if ((cached === null || cached === void 0 ? void 0 : cached.isMeasured) && cached.measuredSize !== null) {
|
|
14
14
|
return cached.measuredSize;
|
|
15
15
|
}
|
|
16
|
-
return
|
|
17
|
-
}, [
|
|
16
|
+
return estimatedSize;
|
|
17
|
+
}, [estimatedSize]);
|
|
18
18
|
/**
|
|
19
19
|
* 设置项的尺寸(实际测量后调用)
|
|
20
20
|
*/
|
|
@@ -26,10 +26,10 @@ function useItemSizeCache(options) {
|
|
|
26
26
|
}
|
|
27
27
|
cacheRef.current.set(index, {
|
|
28
28
|
measuredSize: size,
|
|
29
|
-
estimatedSize
|
|
29
|
+
estimatedSize,
|
|
30
30
|
isMeasured: true
|
|
31
31
|
});
|
|
32
|
-
}, [
|
|
32
|
+
}, [estimatedSize]);
|
|
33
33
|
return {
|
|
34
34
|
getItemSize,
|
|
35
35
|
setItemSize
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemSizeCache.js","sources":["../../../../src/components/list/hooks/useItemSizeCache.ts"],"sourcesContent":["import { useCallback, useRef } from 'react'\n\n/**\n * useItemSizeCache Hook - 动态尺寸缓存管理\n *\n * 支持垂直滚动(高度)和水平滚动(宽度)两种模式\n */\n\n/** 单个项的尺寸缓存 */\ninterface ItemMeasureCache {\n measuredSize: number | null // 实际测量尺寸\n estimatedSize: number // 估算尺寸\n isMeasured: boolean // 是否已测量\n}\n\ninterface UseItemSizeCacheOptions {\n isHorizontal: boolean // 是否水平滚动\n
|
|
1
|
+
{"version":3,"file":"useItemSizeCache.js","sources":["../../../../src/components/list/hooks/useItemSizeCache.ts"],"sourcesContent":["import { useCallback, useRef } from 'react'\n\n/**\n * useItemSizeCache Hook - 动态尺寸缓存管理\n *\n * 支持垂直滚动(高度)和水平滚动(宽度)两种模式\n */\n\n/** 单个项的尺寸缓存 */\ninterface ItemMeasureCache {\n measuredSize: number | null // 实际测量尺寸\n estimatedSize: number // 估算尺寸\n isMeasured: boolean // 是否已测量\n}\n\ninterface UseItemSizeCacheOptions {\n isHorizontal: boolean // 是否水平滚动\n estimatedSize: number // 估算尺寸\n itemCount: number // 项总数\n}\n\ninterface UseItemSizeCacheReturn {\n /** 获取项的尺寸(高度或宽度) */\n getItemSize: (index: number) => number\n\n /** 设置项的尺寸 */\n setItemSize: (index: number, size: number) => void\n}\n\nexport function useItemSizeCache(\n options: UseItemSizeCacheOptions\n): UseItemSizeCacheReturn {\n const { estimatedSize } = options\n\n // 缓存 Map:key = 索引,value = 尺寸信息\n const cacheRef = useRef<Map<number, ItemMeasureCache>>(new Map())\n\n /**\n * 获取项的尺寸\n * 优先返回实际测量值,否则返回估算值\n */\n const getItemSize = useCallback((index: number): number => {\n const cached = cacheRef.current.get(index)\n\n if (cached?.isMeasured && cached.measuredSize !== null) {\n return cached.measuredSize\n }\n\n return estimatedSize\n }, [estimatedSize])\n\n /**\n * 设置项的尺寸(实际测量后调用)\n */\n const setItemSize = useCallback((index: number, size: number) => {\n const cached = cacheRef.current.get(index)\n\n // 尺寸变化小于 1px,忽略(避免微小抖动)\n if (cached?.measuredSize && Math.abs(cached.measuredSize - size) < 1) {\n return\n }\n\n cacheRef.current.set(index, {\n measuredSize: size,\n estimatedSize,\n isMeasured: true\n })\n }, [estimatedSize])\n\n return {\n getItemSize,\n setItemSize\n }\n}\n"],"names":[],"mappings":";;AA6BM,SAAU,gBAAgB,CAC9B,OAAgC,EAAA;AAEhC,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO;;IAGjC,MAAM,QAAQ,GAAG,MAAM,CAAgC,IAAI,GAAG,EAAE,CAAC;AAEjE;;;AAGG;AACH,IAAA,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,KAAa,KAAY;QACxD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;AAE1C,QAAA,IAAI,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,uBAAN,MAAM,CAAE,UAAU,KAAI,MAAM,CAAC,YAAY,KAAK,IAAI,EAAE;YACtD,OAAO,MAAM,CAAC,YAAY;;AAG5B,QAAA,OAAO,aAAa;AACtB,KAAC,EAAE,CAAC,aAAa,CAAC,CAAC;AAEnB;;AAEG;IACH,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,KAAa,EAAE,IAAY,KAAI;QAC9D,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;;QAG1C,IAAI,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,uBAAN,MAAM,CAAE,YAAY,KAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;YACpE;;AAGF,QAAA,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE;AAC1B,YAAA,YAAY,EAAE,IAAI;YAClB,aAAa;AACb,YAAA,UAAU,EAAE;AACb,SAAA,CAAC;AACJ,KAAC,EAAE,CAAC,aAAa,CAAC,CAAC;IAEnB,OAAO;QACL,WAAW;QACX;KACD;AACH;;;;"}
|
|
@@ -37,12 +37,9 @@ export interface ListProps {
|
|
|
37
37
|
width?: number | string;
|
|
38
38
|
style?: React.CSSProperties;
|
|
39
39
|
children?: React.ReactNode;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
itemHeight?: number;
|
|
43
|
-
itemWidth?: number;
|
|
40
|
+
/** Header 沿滚动方向尺寸;未传时回退到 itemSize */
|
|
41
|
+
headerSize?: number;
|
|
44
42
|
useResizeObserver?: boolean;
|
|
45
|
-
estimatedItemSize?: number;
|
|
46
43
|
onItemSizeChange?: (index: number, size: number) => void;
|
|
47
44
|
showNoMore?: boolean;
|
|
48
45
|
noMoreText?: string;
|
|
@@ -65,13 +65,31 @@ function resolveScrollTargetOffset(options, isHorizontal) {
|
|
|
65
65
|
}
|
|
66
66
|
// eslint-disable-next-line complexity -- List 多端/多模式逻辑集中,已抽离 useListNestedScroll、useListScrollElementAttach、resolveScrollTargetOffset 等
|
|
67
67
|
const InnerList = (props, ref) => {
|
|
68
|
-
var _a, _b
|
|
68
|
+
var _a, _b;
|
|
69
69
|
const { stickyHeader = false, space = 0, height = 400, width = '100%', showScrollbar = true, scrollTop: controlledScrollTop, scrollX = false, scrollY = true, onScroll, onScrollToUpper, onScrollToLower, onScrollStart, onScrollEnd, upperThreshold = 50, lowerThreshold = 50, cacheCount = 2, cacheExtent, enableBackToTop, className, style, children, nestedScroll, scrollElement, scrollRef: scrollRefProp, } = props;
|
|
70
70
|
const isHorizontal = scrollX === true;
|
|
71
71
|
const listType = nestedScroll === true ? 'nested' : 'default';
|
|
72
72
|
const { effectiveScrollElement, effectiveStartOffset, effectiveStartOffsetRef, useScrollElementMode, needAutoFind, autoFindStatus, contentWrapperRef, contentId, } = useListNestedScroll(listType, scrollElement, undefined, isHorizontal);
|
|
73
73
|
const DEFAULT_ITEM_WIDTH = 120;
|
|
74
74
|
const DEFAULT_ITEM_HEIGHT = 40;
|
|
75
|
+
const defaultItemSize = isHorizontal ? DEFAULT_ITEM_WIDTH : DEFAULT_ITEM_HEIGHT;
|
|
76
|
+
const normalizeSize = React.useCallback((value) => {
|
|
77
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0)
|
|
78
|
+
return null;
|
|
79
|
+
return value;
|
|
80
|
+
}, []);
|
|
81
|
+
const resolveItemSizeByIndex = React.useCallback((index, fallback) => {
|
|
82
|
+
const { itemSize, itemData } = props;
|
|
83
|
+
const numberSize = normalizeSize(itemSize);
|
|
84
|
+
if (numberSize != null)
|
|
85
|
+
return numberSize;
|
|
86
|
+
if (typeof itemSize === 'function') {
|
|
87
|
+
const functionSize = normalizeSize(itemSize(index, itemData));
|
|
88
|
+
if (functionSize != null)
|
|
89
|
+
return functionSize;
|
|
90
|
+
}
|
|
91
|
+
return fallback;
|
|
92
|
+
}, [props.itemSize, props.itemData, normalizeSize]);
|
|
75
93
|
// 滚动状态管理
|
|
76
94
|
const containerRef = React.useRef(null);
|
|
77
95
|
// 生成唯一 List ID(用于小程序 ResizeObserver)
|
|
@@ -326,8 +344,7 @@ const InnerList = (props, ref) => {
|
|
|
326
344
|
return result;
|
|
327
345
|
}, [children]);
|
|
328
346
|
// 动态尺寸管理
|
|
329
|
-
const
|
|
330
|
-
const estimatedSize = (_a = props.estimatedItemSize) !== null && _a !== void 0 ? _a : defaultEstimatedSize;
|
|
347
|
+
const estimatedSize = resolveItemSizeByIndex(0, defaultItemSize);
|
|
331
348
|
// 计算总 item 数量(跨所有 section)
|
|
332
349
|
const totalItemCount = React.useMemo(() => {
|
|
333
350
|
return sections.reduce((sum, section) => sum + section.items.length, 0);
|
|
@@ -346,7 +363,7 @@ const InnerList = (props, ref) => {
|
|
|
346
363
|
// 动态尺寸缓存
|
|
347
364
|
const sizeCache = useItemSizeCache({
|
|
348
365
|
isHorizontal,
|
|
349
|
-
|
|
366
|
+
estimatedSize,
|
|
350
367
|
itemCount: totalItemCount
|
|
351
368
|
});
|
|
352
369
|
// header 动态尺寸缓存(sectionIndex -> size)
|
|
@@ -375,6 +392,9 @@ const InnerList = (props, ref) => {
|
|
|
375
392
|
onScrollToLowerRef.current = onScrollToLower;
|
|
376
393
|
const thresholdRef = React.useRef({ upper: upperThreshold, lower: lowerThreshold });
|
|
377
394
|
thresholdRef.current = { upper: upperThreshold, lower: lowerThreshold };
|
|
395
|
+
const listContentLengthRef = React.useRef(0);
|
|
396
|
+
const inUpperZoneRef = React.useRef(true);
|
|
397
|
+
const inLowerZoneRef = React.useRef(false);
|
|
378
398
|
// 小程序 + 动高(virtual-list 风格):测量变化后同帧重排,不做程序性 scrollTop 回拉
|
|
379
399
|
const scheduleWeappDynamicReflow = React.useCallback(() => {
|
|
380
400
|
if (!isWeapp || props.useResizeObserver !== true)
|
|
@@ -440,30 +460,12 @@ const InnerList = (props, ref) => {
|
|
|
440
460
|
});
|
|
441
461
|
}
|
|
442
462
|
}, [sizeCache, scrollCorrection, estimatedSize, isWeapp, props.useResizeObserver, scheduleWeappDynamicReflow]);
|
|
443
|
-
const getDefaultHeaderSize = () => {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
if (typeof props.itemSize === 'number')
|
|
450
|
-
return props.itemSize;
|
|
451
|
-
if (typeof props.itemSize === 'function')
|
|
452
|
-
return props.itemSize(0, props.itemData) || DEFAULT_ITEM_WIDTH;
|
|
453
|
-
return DEFAULT_ITEM_WIDTH;
|
|
454
|
-
}
|
|
455
|
-
else {
|
|
456
|
-
if (typeof props.headerHeight === 'number')
|
|
457
|
-
return props.headerHeight;
|
|
458
|
-
if (typeof props.itemHeight === 'number')
|
|
459
|
-
return props.itemHeight;
|
|
460
|
-
if (typeof props.itemSize === 'number')
|
|
461
|
-
return props.itemSize;
|
|
462
|
-
if (typeof props.itemSize === 'function')
|
|
463
|
-
return props.itemSize(0, props.itemData) || DEFAULT_ITEM_HEIGHT;
|
|
464
|
-
return DEFAULT_ITEM_HEIGHT;
|
|
465
|
-
}
|
|
466
|
-
};
|
|
463
|
+
const getDefaultHeaderSize = React.useCallback(() => {
|
|
464
|
+
const headerSize = normalizeSize(props.headerSize);
|
|
465
|
+
if (headerSize != null)
|
|
466
|
+
return headerSize;
|
|
467
|
+
return resolveItemSizeByIndex(0, defaultItemSize);
|
|
468
|
+
}, [props.headerSize, resolveItemSizeByIndex, defaultItemSize, normalizeSize]);
|
|
467
469
|
// 获取 header 尺寸(支持动态测量)
|
|
468
470
|
const getHeaderSize = React.useCallback((sectionIndex) => {
|
|
469
471
|
if (props.useResizeObserver === true) {
|
|
@@ -472,30 +474,13 @@ const InnerList = (props, ref) => {
|
|
|
472
474
|
return cached;
|
|
473
475
|
}
|
|
474
476
|
return getDefaultHeaderSize();
|
|
475
|
-
}, [props.useResizeObserver,
|
|
477
|
+
}, [props.useResizeObserver, getDefaultHeaderSize]);
|
|
476
478
|
const getItemSize = React.useCallback((index) => {
|
|
477
479
|
if (props.useResizeObserver === true) {
|
|
478
480
|
return sizeCache.getItemSize(index);
|
|
479
481
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
return props.itemWidth;
|
|
483
|
-
if (typeof props.itemSize === 'number')
|
|
484
|
-
return props.itemSize;
|
|
485
|
-
if (typeof props.itemSize === 'function')
|
|
486
|
-
return props.itemSize(index, props.itemData) || DEFAULT_ITEM_WIDTH;
|
|
487
|
-
return DEFAULT_ITEM_WIDTH;
|
|
488
|
-
}
|
|
489
|
-
else {
|
|
490
|
-
if (typeof props.itemHeight === 'number')
|
|
491
|
-
return props.itemHeight;
|
|
492
|
-
if (typeof props.itemSize === 'number')
|
|
493
|
-
return props.itemSize;
|
|
494
|
-
if (typeof props.itemSize === 'function')
|
|
495
|
-
return props.itemSize(index, props.itemData) || DEFAULT_ITEM_HEIGHT;
|
|
496
|
-
return DEFAULT_ITEM_HEIGHT;
|
|
497
|
-
}
|
|
498
|
-
}, [props.useResizeObserver, props.itemWidth, props.itemHeight, props.itemSize, props.itemData, isHorizontal, sizeCache]);
|
|
482
|
+
return resolveItemSizeByIndex(index, defaultItemSize);
|
|
483
|
+
}, [props.useResizeObserver, sizeCache, resolveItemSizeByIndex, defaultItemSize]);
|
|
499
484
|
// 分组累积高度/宽度,sizeCacheVersion 变化时重算
|
|
500
485
|
const sectionOffsets = React.useMemo(() => {
|
|
501
486
|
const offsets = [0];
|
|
@@ -510,7 +495,7 @@ const InnerList = (props, ref) => {
|
|
|
510
495
|
globalItemIndex += section.items.length;
|
|
511
496
|
});
|
|
512
497
|
return offsets;
|
|
513
|
-
}, [sections, space,
|
|
498
|
+
}, [sections, space, getItemSize, getHeaderSize, sizeCacheVersion]);
|
|
514
499
|
// 外层虚拟滚动:可见分组
|
|
515
500
|
const [startSection, endSection] = React.useMemo(() => {
|
|
516
501
|
let start = 0;
|
|
@@ -570,6 +555,7 @@ const InnerList = (props, ref) => {
|
|
|
570
555
|
}
|
|
571
556
|
}, [visibleStartItem, visibleEndItem, props.onScrollIndex]);
|
|
572
557
|
const handleScroll = React.useCallback((e) => {
|
|
558
|
+
var _a, _b, _c, _d;
|
|
573
559
|
let newOffset;
|
|
574
560
|
if (e.detail) {
|
|
575
561
|
newOffset = isHorizontal ? e.detail.scrollLeft : e.detail.scrollTop;
|
|
@@ -578,6 +564,14 @@ const InnerList = (props, ref) => {
|
|
|
578
564
|
newOffset = isHorizontal ? e.scrollLeft : e.scrollTop;
|
|
579
565
|
}
|
|
580
566
|
const effectiveOffset = newOffset;
|
|
567
|
+
const currentThreshold = thresholdRef.current;
|
|
568
|
+
const { upper, lower } = currentThreshold;
|
|
569
|
+
const currentContainerLength = containerRef.current
|
|
570
|
+
? (isHorizontal ? containerRef.current.clientWidth : containerRef.current.clientHeight)
|
|
571
|
+
: containerLength;
|
|
572
|
+
const nowInUpper = effectiveOffset <= upper;
|
|
573
|
+
const currentContentLength = listContentLengthRef.current;
|
|
574
|
+
const nowInLower = currentContentLength > 0 && effectiveOffset + currentContainerLength >= currentContentLength - lower;
|
|
581
575
|
const diff = effectiveOffset - lastScrollTopRef.current;
|
|
582
576
|
scrollDiffListRef.current.shift();
|
|
583
577
|
scrollDiffListRef.current.push(diff);
|
|
@@ -591,6 +585,12 @@ const InnerList = (props, ref) => {
|
|
|
591
585
|
scrollTop: isHorizontal ? 0 : newOffset,
|
|
592
586
|
scrollLeft: isHorizontal ? newOffset : 0
|
|
593
587
|
});
|
|
588
|
+
if (nowInUpper && !inUpperZoneRef.current)
|
|
589
|
+
(_a = onScrollToUpperRef.current) === null || _a === void 0 ? void 0 : _a.call(onScrollToUpperRef);
|
|
590
|
+
if (nowInLower && !inLowerZoneRef.current)
|
|
591
|
+
(_b = onScrollToLowerRef.current) === null || _b === void 0 ? void 0 : _b.call(onScrollToLowerRef);
|
|
592
|
+
inUpperZoneRef.current = nowInUpper;
|
|
593
|
+
inLowerZoneRef.current = nowInLower;
|
|
594
594
|
return;
|
|
595
595
|
}
|
|
596
596
|
scrollCorrection.markUserScrolling();
|
|
@@ -599,7 +599,13 @@ const InnerList = (props, ref) => {
|
|
|
599
599
|
scrollTop: isHorizontal ? 0 : newOffset,
|
|
600
600
|
scrollLeft: isHorizontal ? newOffset : 0
|
|
601
601
|
});
|
|
602
|
-
|
|
602
|
+
if (nowInUpper && !inUpperZoneRef.current)
|
|
603
|
+
(_c = onScrollToUpperRef.current) === null || _c === void 0 ? void 0 : _c.call(onScrollToUpperRef);
|
|
604
|
+
if (nowInLower && !inLowerZoneRef.current)
|
|
605
|
+
(_d = onScrollToLowerRef.current) === null || _d === void 0 ? void 0 : _d.call(onScrollToLowerRef);
|
|
606
|
+
inUpperZoneRef.current = nowInUpper;
|
|
607
|
+
inLowerZoneRef.current = nowInLower;
|
|
608
|
+
}, [isHorizontal, onScroll, updateRenderOffset, scrollCorrection, props.useResizeObserver, containerLength]);
|
|
603
609
|
// 小程序:onScrollEnd 优先结束 isUserScrolling,timeout 兜底
|
|
604
610
|
const handleNativeScrollEnd = React.useCallback(() => {
|
|
605
611
|
if (isWeapp) {
|
|
@@ -744,9 +750,7 @@ const InnerList = (props, ref) => {
|
|
|
744
750
|
// ScrollView 属性
|
|
745
751
|
const scrollViewProps = Object.assign(Object.assign(Object.assign(Object.assign({ scrollY: !scrollX && scrollY, scrollX, style: containerStyle, className, enhanced: true, showScrollbar,
|
|
746
752
|
upperThreshold,
|
|
747
|
-
lowerThreshold, scrollWithAnimation: false, onScroll: handleScroll,
|
|
748
|
-
onScrollToLower,
|
|
749
|
-
onScrollStart, onScrollEnd: handleNativeScrollEnd, enableBackToTop }, (isWeapp ? { scrollAnchoring: true } : {})), (typeof cacheExtent === 'number' ? { cacheExtent } : {})), scrollViewRefresherProps), scrollViewRefresherHandlers);
|
|
753
|
+
lowerThreshold, scrollWithAnimation: false, onScroll: handleScroll, onScrollStart, onScrollEnd: handleNativeScrollEnd, enableBackToTop }, (isWeapp ? { scrollAnchoring: true } : {})), (typeof cacheExtent === 'number' ? { cacheExtent } : {})), scrollViewRefresherProps), scrollViewRefresherHandlers);
|
|
750
754
|
// H5 对齐小程序:refresherTriggered=true 时顶部立即显示加载指示器,滚到顶部并锁定滚动直至设为 false
|
|
751
755
|
React.useEffect(() => {
|
|
752
756
|
if (!isH5 || !refresherConfig || supportsNativeRefresher || !h5RefresherProps.isRefreshing)
|
|
@@ -835,7 +839,6 @@ const InnerList = (props, ref) => {
|
|
|
835
839
|
const listContentLength = sectionOffsets[sectionOffsets.length - 1] + noMoreHeight;
|
|
836
840
|
const totalLength = listContentLength;
|
|
837
841
|
// scrollElement 模式下 onScrollToLower 需用内层内容高度判断,供 scroll handler 读取
|
|
838
|
-
const listContentLengthRef = React.useRef(0);
|
|
839
842
|
listContentLengthRef.current = listContentLength;
|
|
840
843
|
const scrollAttachRefsRef = React.useRef(null);
|
|
841
844
|
scrollAttachRefsRef.current = {
|
|
@@ -874,7 +877,7 @@ const InnerList = (props, ref) => {
|
|
|
874
877
|
}
|
|
875
878
|
}
|
|
876
879
|
return null;
|
|
877
|
-
}, [stickyHeader, renderOffset, sectionOffsets, sections
|
|
880
|
+
}, [stickyHeader, renderOffset, sectionOffsets, sections]);
|
|
878
881
|
// 渲染分组+item双层虚拟滚动
|
|
879
882
|
const renderSections = () => {
|
|
880
883
|
const nodes = [];
|
|
@@ -1218,7 +1221,7 @@ const InnerList = (props, ref) => {
|
|
|
1218
1221
|
height: refresherHeightForH5,
|
|
1219
1222
|
zIndex: 0,
|
|
1220
1223
|
transform: `translateY(${h5RefresherTranslateY}px)`,
|
|
1221
|
-
}, children: renderRefresherContent() }), jsxs(View, { style: Object.assign(Object.assign(Object.assign({}, listWrapperStyle), pullTranslate), { zIndex: 1, background: (
|
|
1224
|
+
}, children: renderRefresherContent() }), jsxs(View, { style: Object.assign(Object.assign(Object.assign({}, listWrapperStyle), pullTranslate), { zIndex: 1, background: (_b = (_a = style === null || style === void 0 ? void 0 : style.background) !== null && _a !== void 0 ? _a : style === null || style === void 0 ? void 0 : style.backgroundColor) !== null && _b !== void 0 ? _b : '#fff' }), children: [stickyHeaderNode, renderSections(), renderNoMoreContent()] })] })) : (jsxs(Fragment, { children: [stickyHeaderNode, renderSections(), renderNoMoreContent()] })) }));
|
|
1222
1225
|
}
|
|
1223
1226
|
return (jsxs(ScrollView, Object.assign({ ref: containerRef }, scrollViewProps, { id: listId, children: [supportsNativeRefresher && renderRefresherContent(), renderContentArea()] })));
|
|
1224
1227
|
};
|
|
@@ -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 { 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 }) => 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 headerHeight?: number\n headerWidth?: number\n itemHeight?: number\n itemWidth?: number\n\n // ===== 动态尺寸(与 type=\"dynamic\" 语义对齐)=====\n useResizeObserver?: boolean\n estimatedItemSize?: number\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 // ===== 扩展:嵌套滚动(H5,借鉴 react-virtualized scrollElement)=====\n /** 是否嵌套模式,与 plato 对齐;true=使用父级滚动,需配合 scrollElement 或 Context;不传或 false=default */\n nestedScroll?: boolean\n /** 自定义滚动容器 ref,nestedScroll 模式下从 props 或 Context 获取 */\n scrollElement?: React.RefObject<HTMLElement | null>\n /** 暴露滚动容器 ref,供内层 List/WaterFlow(nestedScroll)嵌套时传入 scrollElement */\n scrollRef?: React.MutableRefObject<HTMLElement | null>\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)\n const DEFAULT_ITEM_WIDTH = 120\n const DEFAULT_ITEM_HEIGHT = 40\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 // 滚动追踪相关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 // 处理渲染偏移量更新。\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 requestAnimationFrame(() => {\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 }\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 defaultEstimatedSize = isHorizontal ? DEFAULT_ITEM_WIDTH : DEFAULT_ITEM_HEIGHT\n const estimatedSize = props.estimatedItemSize ?? defaultEstimatedSize\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 // 小程序端:测量触发 re-render 时,reflow 帧传 eff 并同步 scrollViewOffset,避免下一帧传 0 导致跳变\n const measureScrollProtectRef = React.useRef(false)\n // 动态尺寸缓存\n const sizeCache = useItemSizeCache({\n isHorizontal,\n estimatedItemSize: 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\n // 小程序 + 动高(virtual-list 风格):测量变化后同帧重排,不做程序性 scrollTop 回拉\n const scheduleWeappDynamicReflow = React.useCallback(() => {\n if (!isWeapp || props.useResizeObserver !== true) return\n if (sizeCacheRafRef.current != null) return\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n measureScrollProtectRef.current = true\n setSizeCacheVersion((v) => v + 1)\n })\n }, [isWeapp, props.useResizeObserver])\n\n // ResizeObserver(当启用动态测量时)\n const resizeObserver = useResizeObserver({\n enabled: props.useResizeObserver === true,\n isHorizontal,\n listId,\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 = () => {\n if (isHorizontal) {\n if (typeof props.headerWidth === 'number') return props.headerWidth\n if (typeof props.itemWidth === 'number') return props.itemWidth\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(0, props.itemData) || DEFAULT_ITEM_WIDTH\n return DEFAULT_ITEM_WIDTH\n } else {\n if (typeof props.headerHeight === 'number') return props.headerHeight\n if (typeof props.itemHeight === 'number') return props.itemHeight\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(0, props.itemData) || DEFAULT_ITEM_HEIGHT\n return DEFAULT_ITEM_HEIGHT\n }\n }\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, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData, isHorizontal])\n\n const getItemSize = React.useCallback((index: number) => {\n if (props.useResizeObserver === true) {\n return sizeCache.getItemSize(index)\n }\n if (isHorizontal) {\n if (typeof props.itemWidth === 'number') return props.itemWidth\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(index, props.itemData) || DEFAULT_ITEM_WIDTH\n return DEFAULT_ITEM_WIDTH\n } else {\n if (typeof props.itemHeight === 'number') return props.itemHeight\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(index, props.itemData) || DEFAULT_ITEM_HEIGHT\n return DEFAULT_ITEM_HEIGHT\n }\n }, [props.useResizeObserver, props.itemWidth, props.itemHeight, props.itemSize, props.itemData, isHorizontal, sizeCache])\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, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData, 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 diff = effectiveOffset - lastScrollTopRef.current\n scrollDiffListRef.current.shift()\n scrollDiffListRef.current.push(diff)\n const shaking = isScrollingRef.current && isShaking(scrollDiffListRef.current)\n if (shaking) return\n\n if (programmaticCooldownRef.current) {\n lastScrollTopRef.current = effectiveOffset\n setRenderOffset(effectiveOffset)\n onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\n return\n }\n\n scrollCorrection.markUserScrolling()\n updateRenderOffset(effectiveOffset, false, 'onScroll')\n\n onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\n }, [isHorizontal, onScroll, updateRenderOffset, scrollCorrection, props.useResizeObserver])\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 }\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 onScrollToUpper,\n onScrollToLower,\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:weapp 传 scrollViewOffset(reflow 帧传 eff 防跳变);H5 仅非用户滑动时传\n if (isWeapp) {\n if (measureScrollProtectRef.current) {\n measureScrollProtectRef.current = false\n const eff = lastScrollTopRef.current\n setScrollViewOffset(eff)\n if (isHorizontal) {\n scrollViewProps.scrollLeft = eff\n } else {\n scrollViewProps.scrollTop = eff\n }\n programmaticScrollRef.current = false\n } else {\n const sv = scrollViewOffset\n if (isHorizontal) {\n scrollViewProps.scrollLeft = sv\n } else {\n scrollViewProps.scrollTop = sv\n }\n programmaticScrollRef.current = false\n }\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 const listContentLengthRef = React.useRef(0)\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 // 兜底:measure 未完成或失败时供 onScrollToUpper/Lower 及 containerLengthRef 使用\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, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData])\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 Taro.createSelectorQuery()\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 Taro.createSelectorQuery()\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":";;;;;;;;;;;;;;;;;;;;AAsGM,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,IAAI,YAAY,GAAG,CAAC;AACpB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACrC,QAAA,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AAAE,YAAA,YAAY,EAAE;;IAEjE,OAAO,YAAY,IAAI,CAAC;AAC1B;AAEA;AACA;AACA,SAAS,sBAAsB,CAAC,KAAa,EAAE,WAAwB,EAAA;AACrE,IAAA,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;AAChC;AAEA;AACA,SAAS,wBAAwB,CAAC,MAAc,EAAE,KAAa,EAAE,iBAAyD;AAM1H;AACA,SAAS,yBAAyB,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B,EAAE,EACnD,iBAAiB,EAAE,CACT,EAAA,CAAA,CAAA;AAEjB,CAAC;AAEK,MAAA,IAAI,GAAG,KAAK,CAAC,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, 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 { 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 }) => 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 // ===== 扩展:嵌套滚动(H5,借鉴 react-virtualized scrollElement)=====\n /** 是否嵌套模式,与 plato 对齐;true=使用父级滚动,需配合 scrollElement 或 Context;不传或 false=default */\n nestedScroll?: boolean\n /** 自定义滚动容器 ref,nestedScroll 模式下从 props 或 Context 获取 */\n scrollElement?: React.RefObject<HTMLElement | null>\n /** 暴露滚动容器 ref,供内层 List/WaterFlow(nestedScroll)嵌套时传入 scrollElement */\n scrollRef?: React.MutableRefObject<HTMLElement | null>\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)\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 // 滚动追踪相关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 // 处理渲染偏移量更新。\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 requestAnimationFrame(() => {\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 }\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 // 小程序端:测量触发 re-render 时,reflow 帧传 eff 并同步 scrollViewOffset,避免下一帧传 0 导致跳变\n const measureScrollProtectRef = React.useRef(false)\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 const scheduleWeappDynamicReflow = React.useCallback(() => {\n if (!isWeapp || props.useResizeObserver !== true) return\n if (sizeCacheRafRef.current != null) return\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n measureScrollProtectRef.current = true\n setSizeCacheVersion((v) => v + 1)\n })\n }, [isWeapp, props.useResizeObserver])\n\n // ResizeObserver(当启用动态测量时)\n const resizeObserver = useResizeObserver({\n enabled: props.useResizeObserver === true,\n isHorizontal,\n listId,\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 const currentContainerLength = containerRef.current\n ? (isHorizontal ? containerRef.current.clientWidth : containerRef.current.clientHeight)\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) return\n\n if (programmaticCooldownRef.current) {\n lastScrollTopRef.current = effectiveOffset\n setRenderOffset(effectiveOffset)\n onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\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 onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\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 }\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:weapp 传 scrollViewOffset(reflow 帧传 eff 防跳变);H5 仅非用户滑动时传\n if (isWeapp) {\n if (measureScrollProtectRef.current) {\n measureScrollProtectRef.current = false\n const eff = lastScrollTopRef.current\n setScrollViewOffset(eff)\n if (isHorizontal) {\n scrollViewProps.scrollLeft = eff\n } else {\n scrollViewProps.scrollTop = eff\n }\n programmaticScrollRef.current = false\n } else {\n const sv = scrollViewOffset\n if (isHorizontal) {\n scrollViewProps.scrollLeft = sv\n } else {\n scrollViewProps.scrollTop = sv\n }\n programmaticScrollRef.current = false\n }\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 // 兜底:measure 未完成或失败时供 onScrollToUpper/Lower 及 containerLengthRef 使用\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 Taro.createSelectorQuery()\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 Taro.createSelectorQuery()\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":";;;;;;;;;;;;;;;;;;;;AAmGM,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,IAAI,YAAY,GAAG,CAAC;AACpB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC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CAAA,EAAA,EAAA,gBAAgB,CAAK,EAAA,aAAa,KAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,UAAU,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,KAAK,CAAE,eAAe,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,MAAM,EAC/H,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAgB,EAChB,cAAc,EAAE,EAChB,mBAAmB,EAAE,IACjB,CACN,EAAA,CAAA,KAEHA,IACG,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAgB,EAChB,cAAc,EAAE,EAChB,mBAAmB,EAAE,CAAA,EAAA,CACrB,CACJ,EAAA,CACI;;IAIX,QACED,KAAC,UAAU,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,GAAG,EAAE,YAAmB,EAAM,EAAA,eAAe,EAAE,EAAA,EAAE,EAAE,MAAM,EAAA,QAAA,EAAA,CAElE,uBAAuB,IAAI,sBAAsB,EAAE,EACnD,iBAAiB,EAAE,CACT,EAAA,CAAA,CAAA;AAEjB,CAAC;AAEK,MAAA,IAAI,GAAG,KAAK,CAAC,UAAU,CAAwB,SAAS;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FlowItem, useFlowItemPositioner } from './flow-item';
|
|
2
2
|
export { FlowSection } from './flow-section';
|
|
3
|
-
export type { FlowSectionProps, WaterFlowProps } from './interface';
|
|
3
|
+
export type { FlowSectionProps, WaterFlowProps, WaterFlowRef } from './interface';
|
|
4
4
|
export { WaterFlow } from './water-flow';
|
|
@@ -35,6 +35,10 @@ export interface WaterFlowProps extends Omit<ScrollViewProps, 'cacheExtent' | 'u
|
|
|
35
35
|
/** scrollIntoView 滚动完成后回调,便于父组件清空 scrollIntoView 以支持重复点击同一目标 */
|
|
36
36
|
onScrollIntoViewComplete?: () => void;
|
|
37
37
|
}
|
|
38
|
+
/** WaterFlow ref 类型,current 指向内容容器,用于 IntersectionObserver root、SelectorQuery.in 等 */
|
|
39
|
+
export interface WaterFlowRef {
|
|
40
|
+
current: HTMLElement | null;
|
|
41
|
+
}
|
|
38
42
|
export interface FlowSectionProps extends BaseProps {
|
|
39
43
|
/**
|
|
40
44
|
* 列数
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PropsWithChildren, ReactElement } from 'react';
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
3
2
|
import type { WaterFlowProps } from './interface';
|
|
4
|
-
export declare
|
|
3
|
+
export declare const WaterFlow: import("react").ForwardRefExoticComponent<Omit<PropsWithChildren<WaterFlowProps>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { View, ScrollView } from '@tarojs/components';
|
|
3
3
|
import Taro, { nextTick } from '@tarojs/taro';
|
|
4
|
-
import { useContext, useRef, useId, useMemo, Children, cloneElement, useEffect, createElement } from 'react';
|
|
4
|
+
import { useContext, useRef, useCallback, useId, useMemo, Children, cloneElement, useEffect, createElement, forwardRef } from 'react';
|
|
5
5
|
import '../../utils/index.js';
|
|
6
6
|
import { ScrollElementContextOrFallback } from '../../utils/scrollElementContext.js';
|
|
7
7
|
import { useMeasureStartOffset } from '../list/hooks/useMeasureStartOffset.js';
|
|
@@ -16,7 +16,7 @@ import { getScrollViewContextNode } from '../../utils/dom.js';
|
|
|
16
16
|
import { debounce } from '../../utils/lodash.js';
|
|
17
17
|
|
|
18
18
|
getSysInfo();
|
|
19
|
-
|
|
19
|
+
const InnerWaterFlow = (_a, ref) => {
|
|
20
20
|
var _b, _c, _d, _e;
|
|
21
21
|
var { children } = _a, props = __rest(_a, ["children"]);
|
|
22
22
|
const { id, style = {}, className, cacheCount = 1, onScrollToUpper, onScrollToLower, upperThresholdCount, lowerThresholdCount, scrollIntoView, nestedScroll, scrollElement, startOffset, containerHeight, onScrollHeightChange, onScrollIntoViewComplete } = props, rest = __rest(props, ["id", "style", "className", "cacheCount", "onScrollToUpper", "onScrollToLower", "upperThresholdCount", "lowerThresholdCount", "scrollIntoView", "nestedScroll", "scrollElement", "startOffset", "containerHeight", "onScrollHeightChange", "onScrollIntoViewComplete"]);
|
|
@@ -24,6 +24,13 @@ function WaterFlow(_a) {
|
|
|
24
24
|
// 从 ScrollElementContext 获取 scrollRef(List/ScrollView 内嵌时提供);无 Context 时兜底为 fallback
|
|
25
25
|
const scrollElementCtx = useContext(ScrollElementContextOrFallback);
|
|
26
26
|
const contentWrapperRef = useRef(null);
|
|
27
|
+
const setContainerRef = useCallback((el) => {
|
|
28
|
+
contentWrapperRef.current = el;
|
|
29
|
+
if (typeof ref === 'function')
|
|
30
|
+
ref(el);
|
|
31
|
+
else if (ref)
|
|
32
|
+
ref.current = el;
|
|
33
|
+
}, [ref]);
|
|
27
34
|
const defaultId = useId().replace(/:/g, '');
|
|
28
35
|
const contentId = useMemo(() => id !== null && id !== void 0 ? id : defaultId, [id, defaultId]);
|
|
29
36
|
const needAutoFind = flowType === 'nested' &&
|
|
@@ -359,13 +366,14 @@ function WaterFlow(_a) {
|
|
|
359
366
|
const renderView = useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending');
|
|
360
367
|
if (renderView) {
|
|
361
368
|
return createElement(View, {
|
|
362
|
-
ref:
|
|
369
|
+
ref: setContainerRef,
|
|
363
370
|
id: root.id,
|
|
364
371
|
style: Object.assign(Object.assign({}, style), { width: '100%', position: 'relative', height: scrollHeight$, pointerEvents: isScrolling$ ? 'none' : 'auto' }),
|
|
365
372
|
className,
|
|
366
373
|
}, sections);
|
|
367
374
|
}
|
|
368
375
|
return createElement(ScrollView, Object.assign({ id: root.id, style: Object.assign({ WebkitOverflowScrolling: 'touch', overflow: 'auto' }, style), className, scrollY: true, onScroll: handleScroll }, rest), createElement(View, {
|
|
376
|
+
ref: setContainerRef,
|
|
369
377
|
id: 'waterflow-root',
|
|
370
378
|
style: {
|
|
371
379
|
width: '100%',
|
|
@@ -374,7 +382,8 @@ function WaterFlow(_a) {
|
|
|
374
382
|
pointerEvents: isScrolling$ ? 'none' : 'auto',
|
|
375
383
|
},
|
|
376
384
|
}, sections));
|
|
377
|
-
}
|
|
385
|
+
};
|
|
386
|
+
const WaterFlow = forwardRef(InnerWaterFlow);
|
|
378
387
|
|
|
379
388
|
export { WaterFlow };
|
|
380
389
|
//# sourceMappingURL=water-flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"water-flow.js","sources":["../../../src/components/water-flow/water-flow.ts"],"sourcesContent":["import { BaseEventOrig, ScrollView, ScrollViewProps, View } from '@tarojs/components'\nimport Taro, { nextTick } from '@tarojs/taro'\nimport {\n Children,\n cloneElement,\n createElement,\n PropsWithChildren,\n ReactElement,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n} from 'react'\n\nimport { debounce, getScrollViewContextNode } from '../../utils'\nimport {\n type ScrollElementContextValueShape,\n ScrollElementContextOrFallback,\n} from '../../utils/scrollElementContext'\nimport { useMeasureStartOffset } from '../list/hooks/useMeasureStartOffset'\nimport { useMeasureStartOffsetWeapp } from '../list/hooks/useMeasureStartOffsetWeapp'\nimport { useScrollParentAutoFind } from '../list/hooks/useScrollParentAutoFind'\nimport { _FlowSectionProps } from './flow-section'\nimport { Root, RootEvents } from './root'\nimport { Section } from './section'\nimport { useMemoizedFn } from './use-memoized-fn'\nimport { useObservedAttr } from './use-observed-attr'\nimport { getSysInfo, isH5, isWeapp } from './utils'\n\nimport type { ScrollDirection, WaterFlowProps } from './interface'\n\ngetSysInfo()\n\nexport function WaterFlow({ children, ...props }: PropsWithChildren<WaterFlowProps>) {\n const {\n id,\n style = {},\n className,\n cacheCount = 1,\n onScrollToUpper,\n onScrollToLower,\n upperThresholdCount,\n lowerThresholdCount,\n scrollIntoView,\n nestedScroll,\n scrollElement,\n startOffset,\n containerHeight,\n onScrollHeightChange,\n onScrollIntoViewComplete,\n ...rest\n } = props\n const flowType = nestedScroll === true ? 'nested' : 'default'\n // 从 ScrollElementContext 获取 scrollRef(List/ScrollView 内嵌时提供);无 Context 时兜底为 fallback\n const scrollElementCtx = useContext(ScrollElementContextOrFallback) as ScrollElementContextValueShape | null\n const contentWrapperRef = useRef<HTMLDivElement>(null)\n const defaultId = useId().replace(/:/g, '')\n const contentId = useMemo(() => id ?? defaultId, [id, defaultId])\n const needAutoFind =\n flowType === 'nested' &&\n !scrollElement &&\n !scrollElementCtx?.scrollRef &&\n (isH5 || isWeapp)\n const { scrollParentRef: autoFoundRef, status: autoFindStatus } = useScrollParentAutoFind(\n contentWrapperRef,\n { enabled: !!needAutoFind, isHorizontal: false, contentId: isWeapp ? contentId : undefined }\n )\n const effectiveScrollElement =\n scrollElement ??\n scrollElementCtx?.scrollRef ??\n (needAutoFind && autoFindStatus === 'found' ? autoFoundRef : null)\n const ctxStart = scrollElementCtx?.startOffset\n const hasExplicitStartOffset = ctxStart != null && ctxStart > 0\n const needMeasureStartOffset =\n flowType === 'nested' &&\n effectiveScrollElement &&\n isH5 &&\n startOffset == null &&\n !hasExplicitStartOffset\n const needMeasureStartOffsetWeapp =\n flowType === 'nested' &&\n effectiveScrollElement &&\n isWeapp &&\n startOffset == null &&\n !hasExplicitStartOffset\n const measuredStartOffset = useMeasureStartOffset(\n effectiveScrollElement ?? { current: null },\n contentWrapperRef,\n { enabled: !!needMeasureStartOffset, isHorizontal: false }\n )\n const effectiveStartOffsetRef = useRef(0)\n const measuredStartOffsetWeapp = useMeasureStartOffsetWeapp(\n effectiveScrollElement ?? { current: null },\n contentId,\n { enabled: !!needMeasureStartOffsetWeapp, isHorizontal: false, startOffsetRef: effectiveStartOffsetRef }\n )\n const effectiveStartOffset =\n startOffset ??\n (ctxStart != null && ctxStart > 0 ? ctxStart : null) ??\n measuredStartOffset ??\n measuredStartOffsetWeapp ??\n 0\n\n const effectiveContainerHeight = containerHeight ?? scrollElementCtx?.containerHeight\n\n const startOffsetRef = useRef(effectiveStartOffset)\n const containerHeightRef = useRef(effectiveContainerHeight)\n const lastReportedHeightRef = useRef<number>(0)\n startOffsetRef.current = effectiveStartOffset\n if (!needMeasureStartOffsetWeapp) {\n effectiveStartOffsetRef.current = effectiveStartOffset\n }\n containerHeightRef.current = effectiveContainerHeight\n\n const useScrollElementMode =\n flowType === 'nested' && !!(effectiveScrollElement && (isH5 || isWeapp))\n if (flowType === 'nested' && !effectiveScrollElement && (isH5 || isWeapp) && autoFindStatus === 'not-found') {\n // eslint-disable-next-line no-console\n console.warn('[WaterFlow] nestedScroll 模式但无 scrollElement(props/Context/自动查找),回退为 default,将渲染自有 ScrollView')\n }\n /**\n * 初始化数据模型\n */\n const root = useMemo(() => {\n return new Root({\n id: contentId,\n cacheCount,\n upperThresholdCount,\n lowerThresholdCount,\n skipContainerMeasure: useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending'),\n })\n }, [contentId, cacheCount, upperThresholdCount, lowerThresholdCount, useScrollElementMode, needAutoFind, autoFindStatus])\n const isScrolling$ = useObservedAttr(root, 'isScrolling')\n const scrollHeight$ = useObservedAttr(root, 'scrollHeight')\n const renderRange$ = useObservedAttr(root, 'renderRange')\n const refEventOrig = useRef<BaseEventOrig>()\n\n /**\n * 滚动事件\n */\n const handleScroll = useMemoizedFn((ev: BaseEventOrig<ScrollViewProps.onScrollDetail>) => {\n refEventOrig.current = ev\n root.sections.forEach((section) => section.getNodeRenderRange())\n const { scrollTop } = ev.detail\n const scrollDirection: ScrollDirection = root.getState().scrollOffset < scrollTop ? 'forward' : 'backward'\n root.setStateBatch({\n scrollDirection: scrollDirection,\n scrollOffset: scrollTop,\n isScrolling: true,\n })\n })\n\n const sections = useMemo(() => {\n const [start, end] = renderRange$\n return Children.map(children, (child: ReactElement<PropsWithChildren<_FlowSectionProps>>, order) => {\n if (Object.is(child, null)) {\n return null\n }\n const sectionProps = child.props\n const sectionId = sectionProps.id || `section-${order}`\n const childCount = Children.count(sectionProps.children)\n let section = root.findSection(sectionId)\n if (section) {\n const originalCount = section.count\n if (childCount > originalCount) {\n section.pushNodes(childCount - originalCount)\n }\n } else {\n section = new Section(root, {\n id: sectionId,\n order,\n col: sectionProps.column ?? 1,\n rowGap: sectionProps.rowGap || 0,\n columnGap: sectionProps.columnGap || 0,\n count: Children.count(sectionProps.children),\n })\n }\n\n return cloneElement(child, { section, key: `${props.id}-${order}` })\n })?.slice(start, end + 1)\n }, [renderRange$[0], renderRange$[1], children, root, props.id])\n\n const scrollTo = useMemoizedFn((scrollOffset = 0) => {\n scrollOffset = Math.max(0, scrollOffset)\n if (root.getState().scrollOffset === scrollOffset) return\n if (useScrollElementMode && effectiveScrollElement?.current) {\n const el = effectiveScrollElement.current as any\n const startOff = isWeapp ? effectiveStartOffsetRef.current : (startOffsetRef.current ?? 0)\n const scrollTarget = scrollOffset + startOff\n if (isH5) {\n el.scrollTo({ top: scrollTarget })\n } else if (isWeapp) {\n const scrollViewId = el.id || `_wf_${contentId}`\n if (!el.id) el.id = scrollViewId\n getScrollViewContextNode(`#${scrollViewId}`).then((node: any) => {\n node?.scrollTo?.({ top: scrollTarget, animated: true, duration: 300 })\n })\n }\n root.setStateBatch({ scrollOffset, isScrolling: true })\n root.sections.forEach((s) => s.getNodeRenderRange())\n return\n }\n getScrollViewContextNode(`#${root.id}`).then((node: any) => {\n node.scrollTo({\n animated: true,\n duration: 300,\n top: scrollOffset,\n })\n })\n })\n\n const resetScrolling = useMemoizedFn(() => {\n root.setStateIn('isScrolling', false)\n })\n\n const debouncedResetScrolling = debounce(resetScrolling)\n\n useEffect(() => {\n debouncedResetScrolling()\n }, [isScrolling$])\n\n /**\n * 处理滚动阈值\n * root 需入参:autoFind 从 pending→found 时 root 会重建,必须对新 root 重新订阅\n */\n useEffect(() => {\n const disposers = [\n root.sub(\n RootEvents.ReachUpperThreshold,\n debounce(() => {\n onScrollToUpper?.(refEventOrig.current!)\n })\n ),\n root.sub(\n RootEvents.ReachLowerThreshold,\n debounce(() => {\n onScrollToLower?.(refEventOrig.current!)\n })\n ),\n ]\n return () => {\n disposers.forEach((disposer) => {\n disposer()\n })\n }\n }, [root, onScrollToUpper, onScrollToLower])\n\n /**\n * 处理 scrollIntoView\n * 竞态:快速切换目标时,取消前一次滚动,避免后发先至\n */\n useEffect(() => {\n let cancelled = false\n handleScrollIntoView()\n async function handleScrollIntoView() {\n if (!scrollIntoView) return\n const targetNode = root.findNode(scrollIntoView)\n if (!targetNode) {\n nextTick(() => { if (!cancelled) onScrollIntoViewComplete?.() })\n return\n }\n const targetSection = targetNode.section\n const doScroll = () => {\n if (cancelled) return\n scrollTo(targetNode.getState().scrollTop)\n if (cancelled) return\n nextTick(() => { if (!cancelled) onScrollIntoViewComplete?.() })\n }\n if (!targetSection.getState().layouted) {\n const order = targetSection.order\n root.setStateIn('renderRange', [\n Math.min(renderRange$[0], order),\n Math.max(renderRange$[1], order),\n ])\n nextTick(async () => {\n await targetNode.section.layoutedSignal.promise\n if (cancelled) return\n doScroll()\n })\n return\n }\n await targetSection.layoutedSignal.promise\n if (cancelled) return\n doScroll()\n }\n return () => { cancelled = true }\n }, [scrollIntoView, renderRange$[0], renderRange$[1], onScrollIntoViewComplete])\n\n // scrollElement 模式下监听外部滚动,更新 root.scrollOffset;effectiveStartOffset 变化时重新同步;内嵌时 scrollRef 可能尚未就绪,需重试\n useEffect(() => {\n if (!useScrollElementMode || !effectiveScrollElement) return\n\n let cancelled = false\n let teardown: (() => void) | null = null\n const maxRetries = 20\n\n const tryAttach = (retryCount = 0) => {\n if (cancelled) return\n const target = effectiveScrollElement.current as any\n if (!target) {\n if (retryCount < maxRetries) {\n setTimeout(() => tryAttach(retryCount + 1), 50)\n }\n return\n }\n\n const getStartOffset = () => (isWeapp ? effectiveStartOffsetRef.current : (startOffsetRef.current ?? 0))\n\n const handler = (e?: any) => {\n const scrollTop = isWeapp\n ? (e?.target?.scrollTop ?? e?.mpEvent?.detail?.scrollTop ?? 0)\n : target.scrollTop\n const offset = scrollTop - getStartOffset()\n const effectiveOffset = Math.max(0, offset)\n const prevOffset = root.getState().scrollOffset\n const scrollDirection: ScrollDirection = prevOffset < effectiveOffset ? 'forward' : 'backward'\n\n root.sections.forEach((section) => section.getNodeRenderRange())\n root.setStateBatch({\n scrollDirection,\n scrollOffset: effectiveOffset,\n isScrolling: true,\n })\n }\n\n if (isWeapp) {\n if (!target.id) target.id = `_wf_${contentId}`\n const scrollViewId = target.id\n const instance = Taro.getCurrentInstance()\n const query = instance?.page\n ? Taro.createSelectorQuery().in(instance.page as any)\n : Taro.createSelectorQuery()\n query.select(`#${scrollViewId}`).scrollOffset().exec((res) => {\n if (cancelled) return\n const info = res?.[0]\n if (info) {\n const scrollTopVal = info.scrollTop ?? 0\n const initialOffset = Math.max(0, scrollTopVal - getStartOffset())\n root.setStateBatch({ scrollOffset: initialOffset, isScrolling: true })\n root.sections.forEach((s) => s.getNodeRenderRange())\n }\n })\n } else {\n const initialOffset = Math.max(0, target.scrollTop - getStartOffset())\n root.setStateBatch({ scrollOffset: initialOffset, isScrolling: true })\n root.sections.forEach((s) => s.getNodeRenderRange())\n }\n\n target.addEventListener('scroll', handler, isWeapp ? undefined : { passive: true })\n teardown = () => target.removeEventListener('scroll', handler)\n }\n\n tryAttach()\n return () => {\n cancelled = true\n teardown?.()\n }\n }, [useScrollElementMode, effectiveScrollElement, root, effectiveStartOffset, contentId])\n\n // scrollHeight 变化时回调(props 优先,其次从 Context),便于 List 动高联动;防抖 150ms 上报\n const reportHeight = onScrollHeightChange ?? scrollElementCtx?.reportNestedHeightChange\n useEffect(() => {\n if (!reportHeight || scrollHeight$ <= 0) return\n const timer = setTimeout(() => {\n if (Math.abs(lastReportedHeightRef.current - scrollHeight$) < 1) return\n lastReportedHeightRef.current = scrollHeight$\n reportHeight(scrollHeight$)\n }, 150)\n return () => clearTimeout(timer)\n }, [scrollHeight$, reportHeight])\n\n // scrollElement 模式下监听容器尺寸:H5 用 ResizeObserver,小程序用 createSelectorQuery 轮询\n useEffect(() => {\n if (!useScrollElementMode || !effectiveScrollElement) return\n const el = effectiveScrollElement.current as any\n if (!el) return\n\n if (isWeapp) {\n if (!el.id) el.id = `_wf_${contentId}`\n const scrollViewId = el.id\n const measure = () => {\n const instance = Taro.getCurrentInstance()\n const query = instance?.page\n ? Taro.createSelectorQuery().in(instance.page as any)\n : Taro.createSelectorQuery()\n query.select(`#${scrollViewId}`).boundingClientRect().exec((res) => {\n const rect = res?.[0]\n if (rect && rect.height > 0 && rect.width > 0) {\n const height = containerHeightRef.current ?? rect.height\n root.setStateIn('containerSize', { width: rect.width, height })\n }\n })\n }\n measure()\n const interval = setInterval(measure, 150)\n return () => clearInterval(interval)\n }\n\n if (typeof ResizeObserver === 'undefined') return\n const update = () => {\n const height = containerHeightRef.current ?? el.clientHeight\n const width = el.clientWidth\n if (height > 0 && width > 0) {\n root.setStateIn('containerSize', { width, height })\n }\n }\n update()\n const ro = new ResizeObserver(update)\n ro.observe(el)\n return () => ro.disconnect()\n }, [useScrollElementMode, effectiveScrollElement, root, effectiveContainerHeight, contentId])\n\n // scrollElement 模式下只渲染内容 View(不渲染 ScrollView);内容高度须为 scrollHeight 以支持父级滚动;needAutoFind 且 pending 时 probe 渲染以便查找父容器\n const renderView =\n useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending')\n if (renderView) {\n return createElement(\n View,\n {\n ref: contentWrapperRef as any,\n id: root.id,\n style: {\n ...style,\n width: '100%',\n position: 'relative',\n height: scrollHeight$,\n pointerEvents: isScrolling$ ? 'none' : 'auto',\n },\n className,\n },\n sections\n )\n }\n\n return createElement(\n ScrollView,\n {\n id: root.id,\n style: {\n WebkitOverflowScrolling: 'touch',\n overflow: 'auto',\n ...style,\n },\n className,\n scrollY: true,\n onScroll: handleScroll,\n ...rest,\n },\n createElement(\n View,\n {\n id: 'waterflow-root',\n style: {\n width: '100%',\n position: 'relative',\n height: scrollHeight$,\n pointerEvents: isScrolling$ ? 'none' : 'auto',\n },\n },\n sections\n )\n )\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgCA,UAAU,EAAE;AAEN,SAAU,SAAS,CAAC,EAAyD,EAAA;;AAAzD,IAAA,IAAA,EAAE,QAAQ,EAA+C,GAAA,EAAA,EAA1C,KAAK,GAAA,MAAA,CAAA,EAAA,EAApB,YAAsB,CAAF;AAC5C,IAAA,MAAM,EACJ,EAAE,EACF,KAAK,GAAG,EAAE,EACV,SAAS,EACT,UAAU,GAAG,CAAC,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EAEtB,GAAA,KAAK,EADJ,IAAI,GAAA,MAAA,CACL,KAAK,EAjBH,CAAA,IAAA,EAAA,OAAA,EAAA,WAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,eAAA,EAAA,aAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,0BAAA,CAiBL,CAAQ;AACT,IAAA,MAAM,QAAQ,GAAG,YAAY,KAAK,IAAI,GAAG,QAAQ,GAAG,SAAS;;AAE7D,IAAA,MAAM,gBAAgB,GAAG,UAAU,CAAC,8BAA8B,CAA0C;AAC5G,IAAA,MAAM,iBAAiB,GAAG,MAAM,CAAiB,IAAI,CAAC;IACtD,MAAM,SAAS,GAAG,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;IAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,KAAF,IAAA,IAAA,EAAE,cAAF,EA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ACD,QAAQ,CACT;;AAGH,IAAA,OAAO,aAAa,CAClB,UAAU,EAER,MAAA,CAAA,MAAA,CAAA,EAAA,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EACH,MAAA,CAAA,MAAA,CAAA,EAAA,uBAAuB,EAAE,OAAO,EAChC,QAAQ,EAAE,MAAM,EAAA,EACb,KAAK,CAEV,EAAA,SAAS,EACT,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,YAAY,EACnB,EAAA,IAAI,GAET,aAAa,CACX,IAAI,EACJ;AACE,QAAA,EAAE,EAAE,gBAAgB;AACpB,QAAA,KAAK,EAAE;AACL,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM;AAC9C,SAAA;KACF,EACD,QAAQ,CACT,CACF;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"water-flow.js","sources":["../../../src/components/water-flow/water-flow.ts"],"sourcesContent":["import { BaseEventOrig, ScrollView, ScrollViewProps, View } from '@tarojs/components'\nimport Taro, { nextTick } from '@tarojs/taro'\nimport {\n Children,\n cloneElement,\n createElement,\n forwardRef,\n PropsWithChildren,\n ReactElement,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n} from 'react'\n\nimport { debounce, getScrollViewContextNode } from '../../utils'\nimport {\n type ScrollElementContextValueShape,\n ScrollElementContextOrFallback,\n} from '../../utils/scrollElementContext'\nimport { useMeasureStartOffset } from '../list/hooks/useMeasureStartOffset'\nimport { useMeasureStartOffsetWeapp } from '../list/hooks/useMeasureStartOffsetWeapp'\nimport { useScrollParentAutoFind } from '../list/hooks/useScrollParentAutoFind'\nimport { _FlowSectionProps } from './flow-section'\nimport { Root, RootEvents } from './root'\nimport { Section } from './section'\nimport { useMemoizedFn } from './use-memoized-fn'\nimport { useObservedAttr } from './use-observed-attr'\nimport { getSysInfo, isH5, isWeapp } from './utils'\n\nimport type { ScrollDirection, WaterFlowProps } from './interface'\n\ngetSysInfo()\n\nconst InnerWaterFlow = (\n { children, ...props }: PropsWithChildren<WaterFlowProps>,\n ref: React.ForwardedRef<HTMLElement>\n) => {\n const {\n id,\n style = {},\n className,\n cacheCount = 1,\n onScrollToUpper,\n onScrollToLower,\n upperThresholdCount,\n lowerThresholdCount,\n scrollIntoView,\n nestedScroll,\n scrollElement,\n startOffset,\n containerHeight,\n onScrollHeightChange,\n onScrollIntoViewComplete,\n ...rest\n } = props\n const flowType = nestedScroll === true ? 'nested' : 'default'\n // 从 ScrollElementContext 获取 scrollRef(List/ScrollView 内嵌时提供);无 Context 时兜底为 fallback\n const scrollElementCtx = useContext(ScrollElementContextOrFallback) as ScrollElementContextValueShape | null\n const contentWrapperRef = useRef<HTMLDivElement>(null)\n const setContainerRef = useCallback(\n (el: HTMLElement | null) => {\n (contentWrapperRef as React.MutableRefObject<HTMLElement | null>).current = el\n if (typeof ref === 'function') ref(el)\n else if (ref) (ref as React.MutableRefObject<HTMLElement | null>).current = el\n },\n [ref]\n )\n const defaultId = useId().replace(/:/g, '')\n const contentId = useMemo(() => id ?? defaultId, [id, defaultId])\n const needAutoFind =\n flowType === 'nested' &&\n !scrollElement &&\n !scrollElementCtx?.scrollRef &&\n (isH5 || isWeapp)\n const { scrollParentRef: autoFoundRef, status: autoFindStatus } = useScrollParentAutoFind(\n contentWrapperRef,\n { enabled: !!needAutoFind, isHorizontal: false, contentId: isWeapp ? contentId : undefined }\n )\n const effectiveScrollElement =\n scrollElement ??\n scrollElementCtx?.scrollRef ??\n (needAutoFind && autoFindStatus === 'found' ? autoFoundRef : null)\n const ctxStart = scrollElementCtx?.startOffset\n const hasExplicitStartOffset = ctxStart != null && ctxStart > 0\n const needMeasureStartOffset =\n flowType === 'nested' &&\n effectiveScrollElement &&\n isH5 &&\n startOffset == null &&\n !hasExplicitStartOffset\n const needMeasureStartOffsetWeapp =\n flowType === 'nested' &&\n effectiveScrollElement &&\n isWeapp &&\n startOffset == null &&\n !hasExplicitStartOffset\n const measuredStartOffset = useMeasureStartOffset(\n effectiveScrollElement ?? { current: null },\n contentWrapperRef,\n { enabled: !!needMeasureStartOffset, isHorizontal: false }\n )\n const effectiveStartOffsetRef = useRef(0)\n const measuredStartOffsetWeapp = useMeasureStartOffsetWeapp(\n effectiveScrollElement ?? { current: null },\n contentId,\n { enabled: !!needMeasureStartOffsetWeapp, isHorizontal: false, startOffsetRef: effectiveStartOffsetRef }\n )\n const effectiveStartOffset =\n startOffset ??\n (ctxStart != null && ctxStart > 0 ? ctxStart : null) ??\n measuredStartOffset ??\n measuredStartOffsetWeapp ??\n 0\n\n const effectiveContainerHeight = containerHeight ?? scrollElementCtx?.containerHeight\n\n const startOffsetRef = useRef(effectiveStartOffset)\n const containerHeightRef = useRef(effectiveContainerHeight)\n const lastReportedHeightRef = useRef<number>(0)\n startOffsetRef.current = effectiveStartOffset\n if (!needMeasureStartOffsetWeapp) {\n effectiveStartOffsetRef.current = effectiveStartOffset\n }\n containerHeightRef.current = effectiveContainerHeight\n\n const useScrollElementMode =\n flowType === 'nested' && !!(effectiveScrollElement && (isH5 || isWeapp))\n if (flowType === 'nested' && !effectiveScrollElement && (isH5 || isWeapp) && autoFindStatus === 'not-found') {\n // eslint-disable-next-line no-console\n console.warn('[WaterFlow] nestedScroll 模式但无 scrollElement(props/Context/自动查找),回退为 default,将渲染自有 ScrollView')\n }\n /**\n * 初始化数据模型\n */\n const root = useMemo(() => {\n return new Root({\n id: contentId,\n cacheCount,\n upperThresholdCount,\n lowerThresholdCount,\n skipContainerMeasure: useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending'),\n })\n }, [contentId, cacheCount, upperThresholdCount, lowerThresholdCount, useScrollElementMode, needAutoFind, autoFindStatus])\n const isScrolling$ = useObservedAttr(root, 'isScrolling')\n const scrollHeight$ = useObservedAttr(root, 'scrollHeight')\n const renderRange$ = useObservedAttr(root, 'renderRange')\n const refEventOrig = useRef<BaseEventOrig>()\n\n /**\n * 滚动事件\n */\n const handleScroll = useMemoizedFn((ev: BaseEventOrig<ScrollViewProps.onScrollDetail>) => {\n refEventOrig.current = ev\n root.sections.forEach((section) => section.getNodeRenderRange())\n const { scrollTop } = ev.detail\n const scrollDirection: ScrollDirection = root.getState().scrollOffset < scrollTop ? 'forward' : 'backward'\n root.setStateBatch({\n scrollDirection: scrollDirection,\n scrollOffset: scrollTop,\n isScrolling: true,\n })\n })\n\n const sections = useMemo(() => {\n const [start, end] = renderRange$\n return Children.map(children, (child: ReactElement<PropsWithChildren<_FlowSectionProps>>, order) => {\n if (Object.is(child, null)) {\n return null\n }\n const sectionProps = child.props\n const sectionId = sectionProps.id || `section-${order}`\n const childCount = Children.count(sectionProps.children)\n let section = root.findSection(sectionId)\n if (section) {\n const originalCount = section.count\n if (childCount > originalCount) {\n section.pushNodes(childCount - originalCount)\n }\n } else {\n section = new Section(root, {\n id: sectionId,\n order,\n col: sectionProps.column ?? 1,\n rowGap: sectionProps.rowGap || 0,\n columnGap: sectionProps.columnGap || 0,\n count: Children.count(sectionProps.children),\n })\n }\n\n return cloneElement(child, { section, key: `${props.id}-${order}` })\n })?.slice(start, end + 1)\n }, [renderRange$[0], renderRange$[1], children, root, props.id])\n\n const scrollTo = useMemoizedFn((scrollOffset = 0) => {\n scrollOffset = Math.max(0, scrollOffset)\n if (root.getState().scrollOffset === scrollOffset) return\n if (useScrollElementMode && effectiveScrollElement?.current) {\n const el = effectiveScrollElement.current as any\n const startOff = isWeapp ? effectiveStartOffsetRef.current : (startOffsetRef.current ?? 0)\n const scrollTarget = scrollOffset + startOff\n if (isH5) {\n el.scrollTo({ top: scrollTarget })\n } else if (isWeapp) {\n const scrollViewId = el.id || `_wf_${contentId}`\n if (!el.id) el.id = scrollViewId\n getScrollViewContextNode(`#${scrollViewId}`).then((node: any) => {\n node?.scrollTo?.({ top: scrollTarget, animated: true, duration: 300 })\n })\n }\n root.setStateBatch({ scrollOffset, isScrolling: true })\n root.sections.forEach((s) => s.getNodeRenderRange())\n return\n }\n getScrollViewContextNode(`#${root.id}`).then((node: any) => {\n node.scrollTo({\n animated: true,\n duration: 300,\n top: scrollOffset,\n })\n })\n })\n\n const resetScrolling = useMemoizedFn(() => {\n root.setStateIn('isScrolling', false)\n })\n\n const debouncedResetScrolling = debounce(resetScrolling)\n\n useEffect(() => {\n debouncedResetScrolling()\n }, [isScrolling$])\n\n /**\n * 处理滚动阈值\n * root 需入参:autoFind 从 pending→found 时 root 会重建,必须对新 root 重新订阅\n */\n useEffect(() => {\n const disposers = [\n root.sub(\n RootEvents.ReachUpperThreshold,\n debounce(() => {\n onScrollToUpper?.(refEventOrig.current!)\n })\n ),\n root.sub(\n RootEvents.ReachLowerThreshold,\n debounce(() => {\n onScrollToLower?.(refEventOrig.current!)\n })\n ),\n ]\n return () => {\n disposers.forEach((disposer) => {\n disposer()\n })\n }\n }, [root, onScrollToUpper, onScrollToLower])\n\n /**\n * 处理 scrollIntoView\n * 竞态:快速切换目标时,取消前一次滚动,避免后发先至\n */\n useEffect(() => {\n let cancelled = false\n handleScrollIntoView()\n async function handleScrollIntoView() {\n if (!scrollIntoView) return\n const targetNode = root.findNode(scrollIntoView)\n if (!targetNode) {\n nextTick(() => { if (!cancelled) onScrollIntoViewComplete?.() })\n return\n }\n const targetSection = targetNode.section\n const doScroll = () => {\n if (cancelled) return\n scrollTo(targetNode.getState().scrollTop)\n if (cancelled) return\n nextTick(() => { if (!cancelled) onScrollIntoViewComplete?.() })\n }\n if (!targetSection.getState().layouted) {\n const order = targetSection.order\n root.setStateIn('renderRange', [\n Math.min(renderRange$[0], order),\n Math.max(renderRange$[1], order),\n ])\n nextTick(async () => {\n await targetNode.section.layoutedSignal.promise\n if (cancelled) return\n doScroll()\n })\n return\n }\n await targetSection.layoutedSignal.promise\n if (cancelled) return\n doScroll()\n }\n return () => { cancelled = true }\n }, [scrollIntoView, renderRange$[0], renderRange$[1], onScrollIntoViewComplete])\n\n // scrollElement 模式下监听外部滚动,更新 root.scrollOffset;effectiveStartOffset 变化时重新同步;内嵌时 scrollRef 可能尚未就绪,需重试\n useEffect(() => {\n if (!useScrollElementMode || !effectiveScrollElement) return\n\n let cancelled = false\n let teardown: (() => void) | null = null\n const maxRetries = 20\n\n const tryAttach = (retryCount = 0) => {\n if (cancelled) return\n const target = effectiveScrollElement.current as any\n if (!target) {\n if (retryCount < maxRetries) {\n setTimeout(() => tryAttach(retryCount + 1), 50)\n }\n return\n }\n\n const getStartOffset = () => (isWeapp ? effectiveStartOffsetRef.current : (startOffsetRef.current ?? 0))\n\n const handler = (e?: any) => {\n const scrollTop = isWeapp\n ? (e?.target?.scrollTop ?? e?.mpEvent?.detail?.scrollTop ?? 0)\n : target.scrollTop\n const offset = scrollTop - getStartOffset()\n const effectiveOffset = Math.max(0, offset)\n const prevOffset = root.getState().scrollOffset\n const scrollDirection: ScrollDirection = prevOffset < effectiveOffset ? 'forward' : 'backward'\n\n root.sections.forEach((section) => section.getNodeRenderRange())\n root.setStateBatch({\n scrollDirection,\n scrollOffset: effectiveOffset,\n isScrolling: true,\n })\n }\n\n if (isWeapp) {\n if (!target.id) target.id = `_wf_${contentId}`\n const scrollViewId = target.id\n const instance = Taro.getCurrentInstance()\n const query = instance?.page\n ? Taro.createSelectorQuery().in(instance.page as any)\n : Taro.createSelectorQuery()\n query.select(`#${scrollViewId}`).scrollOffset().exec((res) => {\n if (cancelled) return\n const info = res?.[0]\n if (info) {\n const scrollTopVal = info.scrollTop ?? 0\n const initialOffset = Math.max(0, scrollTopVal - getStartOffset())\n root.setStateBatch({ scrollOffset: initialOffset, isScrolling: true })\n root.sections.forEach((s) => s.getNodeRenderRange())\n }\n })\n } else {\n const initialOffset = Math.max(0, target.scrollTop - getStartOffset())\n root.setStateBatch({ scrollOffset: initialOffset, isScrolling: true })\n root.sections.forEach((s) => s.getNodeRenderRange())\n }\n\n target.addEventListener('scroll', handler, isWeapp ? undefined : { passive: true })\n teardown = () => target.removeEventListener('scroll', handler)\n }\n\n tryAttach()\n return () => {\n cancelled = true\n teardown?.()\n }\n }, [useScrollElementMode, effectiveScrollElement, root, effectiveStartOffset, contentId])\n\n // scrollHeight 变化时回调(props 优先,其次从 Context),便于 List 动高联动;防抖 150ms 上报\n const reportHeight = onScrollHeightChange ?? scrollElementCtx?.reportNestedHeightChange\n useEffect(() => {\n if (!reportHeight || scrollHeight$ <= 0) return\n const timer = setTimeout(() => {\n if (Math.abs(lastReportedHeightRef.current - scrollHeight$) < 1) return\n lastReportedHeightRef.current = scrollHeight$\n reportHeight(scrollHeight$)\n }, 150)\n return () => clearTimeout(timer)\n }, [scrollHeight$, reportHeight])\n\n // scrollElement 模式下监听容器尺寸:H5 用 ResizeObserver,小程序用 createSelectorQuery 轮询\n useEffect(() => {\n if (!useScrollElementMode || !effectiveScrollElement) return\n const el = effectiveScrollElement.current as any\n if (!el) return\n\n if (isWeapp) {\n if (!el.id) el.id = `_wf_${contentId}`\n const scrollViewId = el.id\n const measure = () => {\n const instance = Taro.getCurrentInstance()\n const query = instance?.page\n ? Taro.createSelectorQuery().in(instance.page as any)\n : Taro.createSelectorQuery()\n query.select(`#${scrollViewId}`).boundingClientRect().exec((res) => {\n const rect = res?.[0]\n if (rect && rect.height > 0 && rect.width > 0) {\n const height = containerHeightRef.current ?? rect.height\n root.setStateIn('containerSize', { width: rect.width, height })\n }\n })\n }\n measure()\n const interval = setInterval(measure, 150)\n return () => clearInterval(interval)\n }\n\n if (typeof ResizeObserver === 'undefined') return\n const update = () => {\n const height = containerHeightRef.current ?? el.clientHeight\n const width = el.clientWidth\n if (height > 0 && width > 0) {\n root.setStateIn('containerSize', { width, height })\n }\n }\n update()\n const ro = new ResizeObserver(update)\n ro.observe(el)\n return () => ro.disconnect()\n }, [useScrollElementMode, effectiveScrollElement, root, effectiveContainerHeight, contentId])\n\n // scrollElement 模式下只渲染内容 View(不渲染 ScrollView);内容高度须为 scrollHeight 以支持父级滚动;needAutoFind 且 pending 时 probe 渲染以便查找父容器\n const renderView =\n useScrollElementMode || (!!needAutoFind && autoFindStatus === 'pending')\n if (renderView) {\n return createElement(\n View,\n {\n ref: setContainerRef as any,\n id: root.id,\n style: {\n ...style,\n width: '100%',\n position: 'relative',\n height: scrollHeight$,\n pointerEvents: isScrolling$ ? 'none' : 'auto',\n },\n className,\n },\n sections\n )\n }\n\n return createElement(\n ScrollView,\n {\n id: root.id,\n style: {\n WebkitOverflowScrolling: 'touch',\n overflow: 'auto',\n ...style,\n },\n className,\n scrollY: true,\n onScroll: handleScroll,\n ...rest,\n },\n createElement(\n View,\n {\n ref: setContainerRef as any,\n id: 'waterflow-root',\n style: {\n width: '100%',\n position: 'relative',\n height: scrollHeight$,\n pointerEvents: isScrolling$ ? 'none' : 'auto',\n },\n },\n sections\n )\n )\n}\n\nexport const WaterFlow = forwardRef<HTMLElement, PropsWithChildren<WaterFlowProps>>(InnerWaterFlow)\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkCA,UAAU,EAAE;AAEZ,MAAM,cAAc,GAAG,CACrB,EAAyD,EACzD,GAAoC,KAClC;;AAFF,IAAA,IAAA,EAAE,QAAQ,EAA+C,GAAA,EAAA,EAA1C,KAAK,GAAA,MAAA,CAAA,EAAA,EAApB,YAAsB,CAAF;AAGpB,IAAA,MAAM,EACJ,EAAE,EACF,KAAK,GAAG,EAAE,EACV,SAAS,EACT,UAAU,GAAG,CAAC,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EAEtB,GAAA,KAAK,EADJ,IAAI,GAAA,MAAA,CACL,KAAK,EAjBH,CAAA,IAAA,EAAA,OAAA,EAAA,WAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,eAAA,EAAA,aAAA,EAAA,iBAAA,EAAA,s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9C,SAAA;KACF,EACD,QAAQ,CACT,CACF;AACH,CAAC;MAEY,SAAS,GAAG,UAAU,CAAiD,cAAc;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-advanced",
|
|
3
|
-
"version": "4.1.12-beta.
|
|
3
|
+
"version": "4.1.12-beta.14",
|
|
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.
|
|
24
|
-
"@tarojs/components-react": "4.1.12-beta.
|
|
23
|
+
"@tarojs/components": "4.1.12-beta.14",
|
|
24
|
+
"@tarojs/components-react": "4.1.12-beta.14"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"vue": "3.2.47",
|
|
28
|
-
"@tarojs/runtime": "4.1.12-beta.
|
|
29
|
-
"@tarojs/shared": "4.1.12-beta.
|
|
30
|
-
"@tarojs/taro": "4.1.12-beta.
|
|
28
|
+
"@tarojs/runtime": "4.1.12-beta.14",
|
|
29
|
+
"@tarojs/shared": "4.1.12-beta.14",
|
|
30
|
+
"@tarojs/taro": "4.1.12-beta.14"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=18",
|
|
34
|
-
"@tarojs/
|
|
35
|
-
"@tarojs/
|
|
36
|
-
"@tarojs/
|
|
34
|
+
"@tarojs/runtime": "~4.1.12-beta.14",
|
|
35
|
+
"@tarojs/shared": "~4.1.12-beta.14",
|
|
36
|
+
"@tarojs/taro": "~4.1.12-beta.14"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"react": {
|