@tarojs/components-advanced 4.1.12-beta.2 → 4.1.12-beta.21

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.
Files changed (76) hide show
  1. package/dist/components/index.js +2 -0
  2. package/dist/components/index.js.map +1 -1
  3. package/dist/components/list/NoMore.d.ts +30 -0
  4. package/dist/components/list/NoMore.js +10 -0
  5. package/dist/components/list/NoMore.js.map +1 -0
  6. package/dist/components/list/hooks/useItemSizeCache.d.ts +13 -0
  7. package/dist/components/list/hooks/useItemSizeCache.js +40 -0
  8. package/dist/components/list/hooks/useItemSizeCache.js.map +1 -0
  9. package/dist/components/list/hooks/useListNestedScroll.d.ts +18 -0
  10. package/dist/components/list/hooks/useListNestedScroll.js +61 -0
  11. package/dist/components/list/hooks/useListNestedScroll.js.map +1 -0
  12. package/dist/components/list/hooks/useListScrollElementAttach.d.ts +25 -0
  13. package/dist/components/list/hooks/useListScrollElementAttach.js +88 -0
  14. package/dist/components/list/hooks/useListScrollElementAttach.js.map +1 -0
  15. package/dist/components/list/hooks/useListScrollElementAttachWeapp.d.ts +27 -0
  16. package/dist/components/list/hooks/useListScrollElementAttachWeapp.js +153 -0
  17. package/dist/components/list/hooks/useListScrollElementAttachWeapp.js.map +1 -0
  18. package/dist/components/list/hooks/useMeasureStartOffset.d.ts +12 -0
  19. package/dist/components/list/hooks/useMeasureStartOffset.js +84 -0
  20. package/dist/components/list/hooks/useMeasureStartOffset.js.map +1 -0
  21. package/dist/components/list/hooks/useMeasureStartOffsetWeapp.d.ts +13 -0
  22. package/dist/components/list/hooks/useMeasureStartOffsetWeapp.js +85 -0
  23. package/dist/components/list/hooks/useMeasureStartOffsetWeapp.js.map +1 -0
  24. package/dist/components/list/hooks/useRefresher.d.ts +74 -0
  25. package/dist/components/list/hooks/useRefresher.js +503 -0
  26. package/dist/components/list/hooks/useRefresher.js.map +1 -0
  27. package/dist/components/list/hooks/useResizeObserver.d.ts +26 -0
  28. package/dist/components/list/hooks/useResizeObserver.js +152 -0
  29. package/dist/components/list/hooks/useResizeObserver.js.map +1 -0
  30. package/dist/components/list/hooks/useScrollCorrection.d.ts +19 -0
  31. package/dist/components/list/hooks/useScrollCorrection.js +73 -0
  32. package/dist/components/list/hooks/useScrollCorrection.js.map +1 -0
  33. package/dist/components/list/hooks/useScrollParentAutoFind.d.ts +20 -0
  34. package/dist/components/list/hooks/useScrollParentAutoFind.js +81 -0
  35. package/dist/components/list/hooks/useScrollParentAutoFind.js.map +1 -0
  36. package/dist/components/list/index.d.ts +64 -7
  37. package/dist/components/list/index.js +1041 -162
  38. package/dist/components/list/index.js.map +1 -1
  39. package/dist/components/list/utils.d.ts +16 -0
  40. package/dist/components/list/utils.js +19 -0
  41. package/dist/components/list/utils.js.map +1 -0
  42. package/dist/components/virtual-list/vue/list.d.ts +12 -12
  43. package/dist/components/virtual-waterfall/vue/waterfall.d.ts +11 -11
  44. package/dist/components/water-flow/flow-item.js +6 -4
  45. package/dist/components/water-flow/flow-item.js.map +1 -1
  46. package/dist/components/water-flow/flow-section.js +1 -1
  47. package/dist/components/water-flow/flow-section.js.map +1 -1
  48. package/dist/components/water-flow/index.d.ts +1 -1
  49. package/dist/components/water-flow/interface.d.ts +18 -2
  50. package/dist/components/water-flow/root.d.ts +35 -4
  51. package/dist/components/water-flow/root.js +114 -42
  52. package/dist/components/water-flow/root.js.map +1 -1
  53. package/dist/components/water-flow/section.d.ts +7 -1
  54. package/dist/components/water-flow/section.js +54 -9
  55. package/dist/components/water-flow/section.js.map +1 -1
  56. package/dist/components/water-flow/utils.d.ts +4 -0
  57. package/dist/components/water-flow/utils.js +5 -1
  58. package/dist/components/water-flow/utils.js.map +1 -1
  59. package/dist/components/water-flow/water-flow-node-cache.d.ts +24 -0
  60. package/dist/components/water-flow/water-flow-node-cache.js +161 -0
  61. package/dist/components/water-flow/water-flow-node-cache.js.map +1 -0
  62. package/dist/components/water-flow/water-flow.d.ts +2 -3
  63. package/dist/components/water-flow/water-flow.js +286 -31
  64. package/dist/components/water-flow/water-flow.js.map +1 -1
  65. package/dist/index.js +3 -0
  66. package/dist/index.js.map +1 -1
  67. package/dist/utils/index.d.ts +1 -0
  68. package/dist/utils/index.js +1 -0
  69. package/dist/utils/index.js.map +1 -1
  70. package/dist/utils/scrollElementContext.d.ts +15 -0
  71. package/dist/utils/scrollElementContext.js +14 -0
  72. package/dist/utils/scrollElementContext.js.map +1 -0
  73. package/dist/utils/scrollParent.d.ts +33 -0
  74. package/dist/utils/scrollParent.js +88 -0
  75. package/dist/utils/scrollParent.js.map +1 -0
  76. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport React from 'react'\n\nimport ListItem from './ListItem'\nimport StickyHeader from './StickyHeader'\nimport StickySection from './StickySection'\n\nexport interface ListProps {\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 cacheCount?: number\n stickyHeader?: boolean\n space?: 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 // 纵向 header 高度\n headerWidth?: number // 横向 header 宽度\n itemHeight?: number // 纵向 item 高度\n itemWidth?: number // 横向 item 宽度\n}\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\n// 检测抖动\nexport function isShaking(diffList: number[]): boolean {\n if (diffList.length < 3) return false\n\n // 检查是否有连续的正负交替\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]) {\n alternations++\n }\n }\n\n // 如果交替次数过多,认为是抖动\n return alternations >= 2\n}\n\nconst List: React.FC<ListProps> = (props) => {\n const isH5 = process.env.TARO_ENV === 'h5'\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 upperThreshold = 0,\n lowerThreshold = 0,\n cacheCount = 2,\n style,\n children,\n } = props\n\n const isHorizontal = scrollX === true\n const DEFAULT_ITEM_WIDTH = 120\n const DEFAULT_ITEM_HEIGHT = 40\n\n // 滚动状态管理\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n // 渲染偏移量 - 用于计算应该渲染哪些元素\n const [renderOffset, setRenderOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 滚动视图偏移量 - 只在滚动结束或明确请求时更新到ScrollView\n const [scrollViewOffset, setScrollViewOffset] = React.useState(controlledScrollTop ?? 0)\n\n\n const [containerLength] = React.useState<number>(typeof (isHorizontal ? width : height) === 'number' ? (isHorizontal ? (width as number) : (height as number)) : 400)\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<NodeJS.Timeout | null>(null)\n\n // 解析分组结构,只支持 StickySection 和 ListItem 作为直接子组件\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 // 分组模式\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 // 普通 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 // 工具:获取 header 尺寸,确保所有 header 相关逻辑一致\n const getHeaderSize = () => {\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 // 工具:获取 item 尺寸,支持函数/props/默认值\n const getItemSize = (index: number) => {\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 }\n\n // 计算分组累积高度/宽度\n const sectionOffsets = React.useMemo(() => {\n const offsets: number[] = [0]\n sections.forEach((section) => {\n const headerSize = getHeaderSize()\n const itemSizes = section.items.map((_, i) => getItemSize(i))\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 })\n return offsets\n }, [sections, space, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData])\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 // 触顶/触底事件\n React.useEffect(() => {\n if (onScrollToUpper && renderOffset <= (upperThreshold > 0 ? sectionOffsets[upperThreshold] : 0)) {\n onScrollToUpper()\n }\n if (onScrollToLower && renderOffset + containerLength >= sectionOffsets[sectionOffsets.length - 1] - (lowerThreshold > 0 ? sectionOffsets[sectionOffsets.length - 1] - sectionOffsets[sections.length - lowerThreshold] : 0)) {\n onScrollToLower()\n }\n }, [renderOffset, containerLength, sectionOffsets, sections.length, upperThreshold, lowerThreshold, onScrollToUpper, onScrollToLower])\n\n // 处理渲染偏移量更新\n const updateRenderOffset = React.useCallback((newOffset: number) => {\n lastScrollTopRef.current = newOffset\n isScrollingRef.current = true\n\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n\n setRenderOffset(newOffset) // 立即更新渲染偏移量\n\n // 平台适配:微信小程序使用延时,其他平台立即更新\n const isWeapp = process.env.TARO_ENV === 'weapp'\n if (isWeapp) {\n // 微信小程序:使用延时避免抖动\n scrollTimeoutRef.current = setTimeout(() => {\n isScrollingRef.current = false\n setScrollViewOffset(newOffset) // 滚动结束后,同步滚动视图偏移量\n }, 200)\n } else {\n // 其他平台:立即更新以获得更好的响应性\n setScrollViewOffset(newOffset) // 立即更新滚动视图偏移量\n scrollTimeoutRef.current = setTimeout(() => {\n isScrollingRef.current = false\n }, 200)\n }\n }, [])\n\n\n\n // 智能滚动处理函数\n const handleScroll = React.useCallback((e: any) => {\n // 兼容Stencil版本和React版本的事件结构\n let newOffset: number\n if (e.detail) {\n // React版本的事件结构\n newOffset = isHorizontal ? e.detail.scrollLeft : e.detail.scrollTop\n } else {\n // Stencil版本的事件结构\n newOffset = isHorizontal ? e.scrollLeft : e.scrollTop\n }\n\n const diff = newOffset - lastScrollTopRef.current\n scrollDiffListRef.current.shift()\n scrollDiffListRef.current.push(diff)\n\n // 只保留抖动检测,移除方向检测\n if (isScrollingRef.current && isShaking(scrollDiffListRef.current)) {\n return\n }\n\n updateRenderOffset(newOffset) // 直接更新渲染偏移量\n\n onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\n }, [isHorizontal, onScroll, updateRenderOffset, containerLength])\n\n // 初始化后的延迟同步 - 确保ScrollView正确设置初始位置\n React.useEffect(() => {\n if (typeof controlledScrollTop === 'number') {\n setScrollViewOffset(controlledScrollTop)\n lastScrollTopRef.current = controlledScrollTop\n }\n }, [controlledScrollTop])\n\n // 清理定时器\n React.useEffect(() => {\n return () => {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n }\n }, [])\n\n // 容器样式\n const containerStyle: React.CSSProperties = {\n position: 'relative',\n boxSizing: 'border-box',\n height: isHorizontal ? width : height,\n width: isHorizontal ? height : width,\n ...style,\n }\n\n // 修改ScrollView组件的props,添加data-testid属性\n // ScrollView 属性\n const scrollViewProps: any = {\n scrollY: !scrollX && scrollY,\n scrollX: scrollX,\n style: containerStyle,\n enhanced: true,\n showScrollbar: showScrollbar,\n onScroll: handleScroll,\n onScrollToUpper,\n onScrollToLower,\n 'data-testid': 'taro-list-container'\n }\n\n // 设置ScrollView的滚动位置 - 同时兼容React版本和Stencil版本\n if (isHorizontal) {\n scrollViewProps.scrollLeft = scrollViewOffset // React版本\n scrollViewProps.mpScrollLeft = scrollViewOffset // Stencil版本\n } else {\n scrollViewProps.scrollTop = scrollViewOffset // React版本\n scrollViewProps.mpScrollTop = scrollViewOffset // Stencil版本\n }\n\n // H5上额外使用DOM直接操作确保滚动位置正确\n if (isH5) {\n React.useEffect(() => {\n if (containerRef.current && typeof scrollViewOffset === 'number') {\n if (isHorizontal) {\n containerRef.current.scrollLeft = scrollViewOffset\n } else {\n containerRef.current.scrollTop = scrollViewOffset\n }\n }\n }, [scrollViewOffset, isHorizontal])\n }\n\n // 总高度/宽度\n const totalLength = sectionOffsets[sectionOffsets.length - 1]\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 const headerSize = getHeaderSize()\n // 内联样式替代className\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: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal ? { width: headerSize } : { height: headerSize })\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 for (let s = startSection; s <= endSection; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize()\n const itemSizes = section.items.map((_, i) => getItemSize(i))\n // header\n if (section.header) {\n // 内联样式替代className\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: headerSize }\n : { top: offset, height: headerSize })\n }\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, section.header)\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 // 渲染可见item\n for (let i = startItem; i <= endItem; i++) {\n // 内联样式替代className\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 nodes.push(\n React.createElement(View, {\n key: section.key + '-item-' + i,\n style: sectionItemStyle,\n }, section.items[i])\n )\n }\n offset += itemOffsets[itemOffsets.length - 1]\n }\n return nodes\n }\n\n return (\n <ScrollView ref={containerRef} {...scrollViewProps}>\n <View style={isHorizontal ? { width: totalLength, position: 'relative', height: '100%' } : { height: totalLength, position: 'relative', width: '100%' }}>\n {stickyHeaderNode}\n {renderSections()}\n </View>\n </ScrollView>\n )\n}\n\nexport { List, ListItem, StickyHeader, StickySection }\nexport default List\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AAgCA;AACM,SAAU,UAAU,CAAC,GAAa,EAAA;AACtC,IAAA,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;AAClB,IAAA,KAAK,IAAI,CAAC,GA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AC,CAAC;AAC7B,wBAAA,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AACnB,wBAAA,WAAW,EAAE;AACd;AACD,sBAAE;AACA,wBAAA,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC;AAC5B,wBAAA,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AACpB,wBAAA,YAAY,EAAE;AACf,qBAAA,EACJ;gBACD,KAAK,CAAC,IAAI,CACR,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE;AACxB,oBAAA,GAAG,EAAE,OAAO,CAAC,GAAG,GAAG,QAAQ,GAAG,CAAC;AAC/B,oBAAA,KAAK,EAAE,gBAAgB;iBACxB,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACrB;;YAEH,MAAM,IAAI,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;;AAE/C,QAAA,OAAO,KAAK;AACd,KAAC;IAED,QACEA,GAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,GAAG,EAAE,YAAY,EAAM,EAAA,eAAe,EAChD,EAAA,QAAA,EAAAC,IAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,YAAY,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EACpJ,QAAA,EAAA,CAAA,gBAAgB,EAChB,cAAc,EAAE,CAAA,EAAA,CACZ,EACI,CAAA,CAAA;AAEjB;;;;"}
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, detail: { scrollTop: number, scrollLeft: number } }) => void\n onScrollToUpper?: () => void\n onScrollToLower?: () => void\n upperThreshold?: number\n lowerThreshold?: number\n /** 与 ScrollView cacheExtent 对齐(视口外渲染距离),可选 */\n cacheExtent?: number\n /** 与 ScrollView enableBackToTop 对齐 */\n enableBackToTop?: boolean\n /** 与 ScrollView onScrollStart 对齐 */\n onScrollStart?: () => void\n /** 与 ScrollView onScrollEnd 对齐 */\n onScrollEnd?: () => void\n scrollIntoView?: string\n /** 透传给最外层 ScrollView 的 className,便于自定义样式 */\n className?: string\n\n // ===== 与 harmony-cpp ListProps / ListBuilder 对齐 =====\n stickyHeader?: boolean\n space?: number\n cacheCount?: number\n itemData?: any[]\n itemSize?: number | ((index: number, data?: any[]) => number)\n height?: number | string\n width?: number | string\n style?: React.CSSProperties\n children?: React.ReactNode\n /** Header 沿滚动方向尺寸;未传时回退到 itemSize */\n headerSize?: number\n\n // ===== 动态尺寸(与 type=\"dynamic\" 语义对齐)=====\n useResizeObserver?: boolean\n onItemSizeChange?: (index: number, size: number) => void\n\n // ===== NoMore 底部提示 =====\n showNoMore?: boolean\n noMoreText?: string\n noMoreStyle?: React.CSSProperties\n renderNoMore?: () => React.ReactNode\n\n // ===== 扩展:可见索引回调 =====\n onScrollIndex?: (start: number, end: number) => void\n\n // ===== 与 dynamic/harmony 对齐:List 自身可配置下拉刷新,无需 Refresher 子组件 =====\n /** 是否开启下拉刷新;与 Refresher 子组件二选一或同时存在(Refresher 子覆盖同名字段) */\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: 'black' | 'white' | 'none'\n refresherBackground?: string\n refresherTriggered?: boolean\n onRefresherPulling?: (e?: { detail?: { deltaY?: number } }) => void\n onRefresherRefresh?: () => void | Promise<void>\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n onRefresherWillRefresh?: () => void\n onRefresherStatusChange?: (e?: { detail?: { status?: number, dy?: number } }) => void\n\n // ===== 扩展:嵌套滚动(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 const scrollTop = isHorizontal ? 0 : newOffset\n const scrollLeft = isHorizontal ? newOffset : 0\n onScroll?.({ scrollTop, scrollLeft, detail: { scrollTop, scrollLeft } })\n if (nowInUpper && !inUpperZoneRef.current) onScrollToUpperRef.current?.()\n if (nowInLower && !inLowerZoneRef.current) onScrollToLowerRef.current?.()\n inUpperZoneRef.current = nowInUpper\n inLowerZoneRef.current = nowInLower\n return\n }\n\n scrollCorrection.markUserScrolling()\n updateRenderOffset(effectiveOffset, false, 'onScroll')\n\n const scrollTop = isHorizontal ? 0 : newOffset\n const scrollLeft = isHorizontal ? newOffset : 0\n onScroll?.({ scrollTop, scrollLeft, detail: { scrollTop, scrollLeft } })\n if (nowInUpper && !inUpperZoneRef.current) onScrollToUpperRef.current?.()\n if (nowInLower && !inLowerZoneRef.current) onScrollToLowerRef.current?.()\n inUpperZoneRef.current = nowInUpper\n inLowerZoneRef.current = nowInLower\n }, [isHorizontal, onScroll, updateRenderOffset, scrollCorrection, props.useResizeObserver, containerLength])\n\n // 小程序:onScrollEnd 优先结束 isUserScrolling,timeout 兜底\n const handleNativeScrollEnd = React.useCallback(() => {\n if (isWeapp) {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n scrollTimeoutRef.current = null\n }\n if (isUserScrollingRef.current) {\n isScrollingRef.current = false\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n }\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;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,E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,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;;;;"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * List 组件工具函数
3
+ */
4
+ /** 判断是否为微信小程序 */
5
+ export declare const isWeapp: boolean;
6
+ /** 判断是否为支付宝小程序 */
7
+ export declare const isAlipay: boolean;
8
+ /** 判断是否为 H5 */
9
+ export declare const isH5: boolean;
10
+ /** 判断是否为小程序环境(微信/支付宝/百度/京东/头条等) */
11
+ export declare const isMiniProgram: boolean;
12
+ /**
13
+ * 是否支持原生 refresher(ScrollView refresher-*)
14
+ * 以各平台 components 为准:weapp/jd/tt 的 ScrollView 有 refresher-enabled 等;harmony-hybrid 的 harmony-definition 中 refresher-* 为 false,走自定义下拉
15
+ */
16
+ export declare const supportsNativeRefresher: boolean;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * List 组件工具函数
3
+ */
4
+ /** 判断是否为微信小程序 */
5
+ const isWeapp = process.env.TARO_ENV === 'weapp';
6
+ /** 判断是否为支付宝小程序 */
7
+ const isAlipay = process.env.TARO_ENV === 'alipay';
8
+ /** 判断是否为 H5 */
9
+ const isH5 = process.env.TARO_ENV === 'h5';
10
+ /** 判断是否为小程序环境(微信/支付宝/百度/京东/头条等) */
11
+ const isMiniProgram = isWeapp || isAlipay || process.env.TARO_ENV === 'swan' || process.env.TARO_ENV === 'tt' || process.env.TARO_ENV === 'jd';
12
+ /**
13
+ * 是否支持原生 refresher(ScrollView refresher-*)
14
+ * 以各平台 components 为准:weapp/jd/tt 的 ScrollView 有 refresher-enabled 等;harmony-hybrid 的 harmony-definition 中 refresher-* 为 false,走自定义下拉
15
+ */
16
+ const supportsNativeRefresher = isMiniProgram;
17
+
18
+ export { isAlipay, isH5, isMiniProgram, isWeapp, supportsNativeRefresher };
19
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/list/utils.ts"],"sourcesContent":["/**\n * List 组件工具函数\n */\n\n/** 判断是否为微信小程序 */\nexport const isWeapp = process.env.TARO_ENV === 'weapp'\n\n/** 判断是否为支付宝小程序 */\nexport const isAlipay = process.env.TARO_ENV === 'alipay'\n\n/** 判断是否为 H5 */\nexport const isH5 = process.env.TARO_ENV === 'h5'\n\n/** 判断是否为小程序环境(微信/支付宝/百度/京东/头条等) */\nexport const isMiniProgram = isWeapp || isAlipay || process.env.TARO_ENV === 'swan' || process.env.TARO_ENV === 'tt' || process.env.TARO_ENV === 'jd'\n\n/**\n * 是否支持原生 refresher(ScrollView refresher-*)\n * 以各平台 components 为准:weapp/jd/tt 的 ScrollView 有 refresher-enabled 等;harmony-hybrid 的 harmony-definition 中 refresher-* 为 false,走自定义下拉\n */\nexport const supportsNativeRefresher = isMiniProgram\n"],"names":[],"mappings":"AAAA;;AAEG;AAEH;AACa,MAAA,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK;AAEhD;AACa,MAAA,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK;AAEjD;AACa,MAAA,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK;AAE7C;AACO,MAAM,aAAa,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK;AAEjJ;;;AAGG;AACI,MAAM,uBAAuB,GAAG;;;;"}
@@ -2,11 +2,11 @@ import Preset from '../preset';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  id: StringConstructor;
4
4
  height: {
5
- type: (StringConstructor | NumberConstructor)[];
5
+ type: (NumberConstructor | StringConstructor)[];
6
6
  required: true;
7
7
  };
8
8
  width: {
9
- type: (StringConstructor | NumberConstructor)[];
9
+ type: (NumberConstructor | StringConstructor)[];
10
10
  required: true;
11
11
  };
12
12
  item: {
@@ -93,11 +93,11 @@ declare const _default: import("vue").DefineComponent<{
93
93
  instance: import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
94
94
  id: StringConstructor;
95
95
  height: {
96
- type: (StringConstructor | NumberConstructor)[];
96
+ type: (NumberConstructor | StringConstructor)[];
97
97
  required: true;
98
98
  };
99
99
  width: {
100
- type: (StringConstructor | NumberConstructor)[];
100
+ type: (NumberConstructor | StringConstructor)[];
101
101
  required: true;
102
102
  };
103
103
  item: {
@@ -181,11 +181,11 @@ declare const _default: import("vue").DefineComponent<{
181
181
  }>> & {}, {}, {}, {}, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, Readonly<import("vue").ExtractPropTypes<{
182
182
  id: StringConstructor;
183
183
  height: {
184
- type: (StringConstructor | NumberConstructor)[];
184
+ type: (NumberConstructor | StringConstructor)[];
185
185
  required: true;
186
186
  };
187
187
  width: {
188
- type: (StringConstructor | NumberConstructor)[];
188
+ type: (NumberConstructor | StringConstructor)[];
189
189
  required: true;
190
190
  };
191
191
  item: {
@@ -276,11 +276,11 @@ declare const _default: import("vue").DefineComponent<{
276
276
  }, Readonly<import("vue").ExtractPropTypes<{
277
277
  id: StringConstructor;
278
278
  height: {
279
- type: (StringConstructor | NumberConstructor)[];
279
+ type: (NumberConstructor | StringConstructor)[];
280
280
  required: true;
281
281
  };
282
282
  width: {
283
- type: (StringConstructor | NumberConstructor)[];
283
+ type: (NumberConstructor | StringConstructor)[];
284
284
  required: true;
285
285
  };
286
286
  item: {
@@ -394,11 +394,11 @@ declare const _default: import("vue").DefineComponent<{
394
394
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
395
395
  id: StringConstructor;
396
396
  height: {
397
- type: (StringConstructor | NumberConstructor)[];
397
+ type: (NumberConstructor | StringConstructor)[];
398
398
  required: true;
399
399
  };
400
400
  width: {
401
- type: (StringConstructor | NumberConstructor)[];
401
+ type: (NumberConstructor | StringConstructor)[];
402
402
  required: true;
403
403
  };
404
404
  item: {
@@ -480,14 +480,14 @@ declare const _default: import("vue").DefineComponent<{
480
480
  onScrollNative: FunctionConstructor;
481
481
  onItemsRendered: FunctionConstructor;
482
482
  }>>, {
483
- layout: string;
484
483
  position: string;
484
+ layout: string;
485
485
  direction: string;
486
+ enhanced: boolean;
486
487
  unlimitedSize: boolean;
487
488
  initialScrollOffset: number;
488
489
  overscanCount: number;
489
490
  useIsScrolling: boolean;
490
- enhanced: boolean;
491
491
  outerElementType: string;
492
492
  innerElementType: string;
493
493
  itemElementType: string;
@@ -2,11 +2,11 @@ import Preset from '../preset';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  id: StringConstructor;
4
4
  height: {
5
- type: (StringConstructor | NumberConstructor)[];
5
+ type: (NumberConstructor | StringConstructor)[];
6
6
  required: true;
7
7
  };
8
8
  width: {
9
- type: (StringConstructor | NumberConstructor)[];
9
+ type: (NumberConstructor | StringConstructor)[];
10
10
  required: true;
11
11
  };
12
12
  column: NumberConstructor;
@@ -87,11 +87,11 @@ declare const _default: import("vue").DefineComponent<{
87
87
  instance: import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
88
88
  id: StringConstructor;
89
89
  height: {
90
- type: (StringConstructor | NumberConstructor)[];
90
+ type: (NumberConstructor | StringConstructor)[];
91
91
  required: true;
92
92
  };
93
93
  width: {
94
- type: (StringConstructor | NumberConstructor)[];
94
+ type: (NumberConstructor | StringConstructor)[];
95
95
  required: true;
96
96
  };
97
97
  column: NumberConstructor;
@@ -169,11 +169,11 @@ declare const _default: import("vue").DefineComponent<{
169
169
  }>> & {}, {}, {}, {}, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, Readonly<import("vue").ExtractPropTypes<{
170
170
  id: StringConstructor;
171
171
  height: {
172
- type: (StringConstructor | NumberConstructor)[];
172
+ type: (NumberConstructor | StringConstructor)[];
173
173
  required: true;
174
174
  };
175
175
  width: {
176
- type: (StringConstructor | NumberConstructor)[];
176
+ type: (NumberConstructor | StringConstructor)[];
177
177
  required: true;
178
178
  };
179
179
  column: NumberConstructor;
@@ -258,11 +258,11 @@ declare const _default: import("vue").DefineComponent<{
258
258
  }, Readonly<import("vue").ExtractPropTypes<{
259
259
  id: StringConstructor;
260
260
  height: {
261
- type: (StringConstructor | NumberConstructor)[];
261
+ type: (NumberConstructor | StringConstructor)[];
262
262
  required: true;
263
263
  };
264
264
  width: {
265
- type: (StringConstructor | NumberConstructor)[];
265
+ type: (NumberConstructor | StringConstructor)[];
266
266
  required: true;
267
267
  };
268
268
  column: NumberConstructor;
@@ -368,11 +368,11 @@ declare const _default: import("vue").DefineComponent<{
368
368
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
369
369
  id: StringConstructor;
370
370
  height: {
371
- type: (StringConstructor | NumberConstructor)[];
371
+ type: (NumberConstructor | StringConstructor)[];
372
372
  required: true;
373
373
  };
374
374
  width: {
375
- type: (StringConstructor | NumberConstructor)[];
375
+ type: (NumberConstructor | StringConstructor)[];
376
376
  required: true;
377
377
  };
378
378
  column: NumberConstructor;
@@ -449,11 +449,11 @@ declare const _default: import("vue").DefineComponent<{
449
449
  onItemsRendered: FunctionConstructor;
450
450
  }>>, {
451
451
  position: string;
452
+ enhanced: boolean;
452
453
  unlimitedSize: boolean;
453
454
  initialScrollOffset: number;
454
455
  placeholderCount: number;
455
456
  useIsScrolling: boolean;
456
- enhanced: boolean;
457
457
  outerElementType: string;
458
458
  innerElementType: string;
459
459
  itemElementType: string;
@@ -35,13 +35,15 @@ function FlowItemContainer(_a) {
35
35
  const itemStyle = useMemo(() => {
36
36
  const baseStyle = {
37
37
  width: '100%',
38
- minHeight: node.section.defaultSize,
38
+ position: 'absolute',
39
+ top: 0,
40
+ left: 0,
41
+ transform: `translate3d(0px, ${top$}px, 0px)`,
39
42
  };
40
43
  if (!layouted$) {
41
- return baseStyle;
44
+ return Object.assign(Object.assign({}, baseStyle), { minHeight: node.section.defaultSize });
42
45
  }
43
- Reflect.deleteProperty(baseStyle, 'minHeight');
44
- return Object.assign(Object.assign({}, baseStyle), { height: height$, transition: 'transform 20ms cubic-bezier(0.075, 0.82, 0.165, 1)', willChange: 'transform', position: 'absolute', top: 0, left: 0, transform: `translate3d(0px, ${top$}px, 0px)` });
46
+ return Object.assign(Object.assign({}, baseStyle), { height: height$ });
45
47
  }, [top$, layouted$, height$]);
46
48
  useEffect(() => {
47
49
  let observer;
@@ -1 +1 @@
1
- {"version":3,"file":"flow-item.js","sources":["../../../src/components/water-flow/flow-item.ts"],"sourcesContent":["import { View } from '@tarojs/components'\nimport {\n type CSSProperties,\n type PropsWithChildren,\n createContext,\n createElement,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n} from 'react'\n\nimport { Node, NodeEvents } from './node'\nimport { useMemoizedFn } from './use-memoized-fn'\nimport { useObservedAttr } from './use-observed-attr'\nimport { isWeb } from './utils'\n\nimport type { FlowItemContainerProps } from './interface'\n\nconst FlowItemContext = createContext<{ node: Node }>(Object.create(null))\nexport const useFlowItemPositioner = () => {\n const nodeModel = useContext(FlowItemContext).node\n const width$ = useObservedAttr(nodeModel, 'width')\n const height$ = useObservedAttr(nodeModel, 'height')\n const top$ = useObservedAttr(nodeModel, 'top')\n const scrollTop$ = useObservedAttr(nodeModel, 'scrollTop')\n\n return {\n resize: useMemoizedFn(() => {\n if (!isWeb()) {\n nodeModel.pub(NodeEvents.Resize)\n }\n }),\n top: top$,\n scrollTop: scrollTop$,\n width: width$,\n height: height$,\n }\n}\n\nexport function FlowItemContainer({\n children,\n ...props\n}: PropsWithChildren<FlowItemContainerProps>) {\n const { node } = props\n const layouted$ = useObservedAttr(node, 'layouted')\n const top$ = useObservedAttr(node, 'top')\n const height$ = useObservedAttr(node, 'height')\n const refFlowItem = useRef<HTMLElement>()\n\n const itemStyle: CSSProperties = useMemo(() => {\n const baseStyle: CSSProperties = {\n width: '100%',\n minHeight: node.section.defaultSize,\n }\n if (!layouted$) {\n return baseStyle\n }\n Reflect.deleteProperty(baseStyle, 'minHeight')\n return {\n ...baseStyle,\n height: height$,\n transition: 'transform 20ms cubic-bezier(0.075, 0.82, 0.165, 1)',\n willChange: 'transform',\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `translate3d(0px, ${top$}px, 0px)`,\n }\n }, [top$, layouted$, height$])\n\n useEffect(() => {\n let observer: ResizeObserver\n if (isWeb() && typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n node.pub(NodeEvents.Resize)\n })\n observer.observe(refFlowItem.current!)\n }\n return () => {\n if (observer) {\n observer.disconnect()\n }\n }\n }, [node])\n\n useLayoutEffect(() => {\n node.measure()\n }, [node])\n\n return createElement(\n View,\n { style: itemStyle, key: node.id },\n createElement(\n View,\n { id: node.id, ref: refFlowItem },\n createElement(FlowItemContext.Provider, { value: { node } }, children)\n )\n )\n}\n\nexport function FlowItem(props: PropsWithChildren) {\n return props.children\n}\n"],"names":[],"mappings":";;;;;;;;AAoBA,MAAM,eAAe,GAAG,aAAa,CAAiB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACnE,MAAM,qBAAqB,GAAG,MAAK;IACxC,MAAM,SAAS,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,IAAI;IAClD,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC;IAClD,MAAM,OAAO,GAAG,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpD,MAAM,IAAI,GAAG,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC;IAC9C,MAAM,UAAU,GAAG,eAAe,CAAC,SAAS,EAAE,WAAW,CAAC;IAE1D,OAAO;AACL,QAAA,MAAM,EAAE,aAAa,CAAC,MAAK;AACzB,YAAA,IAAI,CAAC,KAAK,EAAE,EAAE;AACZ,gBAAA,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;;AAEpC,SAAC,CAAC;AACF,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,MAAM,EAAE,OAAO;KAChB;AACH;AAEM,SAAU,iBAAiB,CAAC,EAGU,EAAA;AAHV,IAAA,IAAA,EAChC,QAAQ,EAEkC,GAAA,EAAA,EADvC,KAAK,GAAA,MAAA,CAAA,EAAA,EA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,CAAC;;AAExC,QAAA,OAAO,MAAK;YACV,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,UAAU,EAAE;;AAEzB,SAAC;AACH,KAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAEV,eAAe,CAAC,MAAK;QACnB,IAAI,CAAC,OAAO,EAAE;AAChB,KAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAEV,OAAO,aAAa,CAClB,IAAI,EACJ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,EAClC,aAAa,CACX,IAAI,EACJ,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,EACjC,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,CACvE,CACF;AACH;AAEM,SAAU,QAAQ,CAAC,KAAwB,EAAA;IAC/C,OAAO,KAAK,CAAC,QAAQ;AACvB;;;;"}
1
+ {"version":3,"file":"flow-item.js","sources":["../../../src/components/water-flow/flow-item.ts"],"sourcesContent":["import { View } from '@tarojs/components'\nimport {\n type CSSProperties,\n type PropsWithChildren,\n createContext,\n createElement,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n} from 'react'\n\nimport { Node, NodeEvents } from './node'\nimport { useMemoizedFn } from './use-memoized-fn'\nimport { useObservedAttr } from './use-observed-attr'\nimport { isWeb } from './utils'\n\nimport type { FlowItemContainerProps } from './interface'\n\nconst FlowItemContext = createContext<{ node: Node }>(Object.create(null))\nexport const useFlowItemPositioner = () => {\n const nodeModel = useContext(FlowItemContext).node\n const width$ = useObservedAttr(nodeModel, 'width')\n const height$ = useObservedAttr(nodeModel, 'height')\n const top$ = useObservedAttr(nodeModel, 'top')\n const scrollTop$ = useObservedAttr(nodeModel, 'scrollTop')\n\n return {\n resize: useMemoizedFn(() => {\n if (!isWeb()) {\n nodeModel.pub(NodeEvents.Resize)\n }\n }),\n top: top$,\n scrollTop: scrollTop$,\n width: width$,\n height: height$,\n }\n}\n\nexport function FlowItemContainer({\n children,\n ...props\n}: PropsWithChildren<FlowItemContainerProps>) {\n const { node } = props\n const layouted$ = useObservedAttr(node, 'layouted')\n const top$ = useObservedAttr(node, 'top')\n const height$ = useObservedAttr(node, 'height')\n const refFlowItem = useRef<HTMLElement>()\n\n const itemStyle: CSSProperties = useMemo(() => {\n const baseStyle: CSSProperties = {\n width: '100%',\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `translate3d(0px, ${top$}px, 0px)`,\n }\n if (!layouted$) {\n return {\n ...baseStyle,\n minHeight: node.section.defaultSize,\n }\n }\n return {\n ...baseStyle,\n height: height$,\n }\n }, [top$, layouted$, height$])\n\n useEffect(() => {\n let observer: ResizeObserver\n if (isWeb() && typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n node.pub(NodeEvents.Resize)\n })\n observer.observe(refFlowItem.current!)\n }\n return () => {\n if (observer) {\n observer.disconnect()\n }\n }\n }, [node])\n\n useLayoutEffect(() => {\n node.measure()\n }, [node])\n\n return createElement(\n View,\n { style: itemStyle, key: node.id },\n createElement(\n View,\n { id: node.id, ref: refFlowItem },\n createElement(FlowItemContext.Provider, { value: { node } }, children)\n )\n )\n}\n\nexport function FlowItem(props: PropsWithChildren) {\n return props.children\n}\n"],"names":[],"mappings":";;;;;;;;AAoBA,MAAM,eAAe,GAAG,aAAa,CAAiB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACnE,MAAM,qBAAqB,GAAG,MAAK;IACxC,MAAM,SAAS,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,IAAI;IAClD,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC;IAClD,MAAM,OAAO,GAAG,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpD,MAAM,IAAI,GAAG,eAAe,CAAC,SAAS,EAAE,KAAK,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,QAAA,OAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACK,SAAS,CAAA,EAAA,EACZ,MAAM,EAAE,OAAO,EAChB,CAAA;KACF,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAE9B,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,QAAwB;QAC5B,IAAI,KAAK,EAAE,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;AACpD,YAAA,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAK;AACjC,gBAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;AAC7B,aAAC,CAAC;AACF,YAAA,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,OAAQ,CAAC;;AAExC,QAAA,OAAO,MAAK;YACV,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,UAAU,EAAE;;AAEzB,SAAC;AACH,KAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAEV,eAAe,CAAC,MAAK;QACnB,IAAI,CAAC,OAAO,EAAE;AAChB,KAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAEV,OAAO,aAAa,CAClB,IAAI,EACJ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,EAClC,aAAa,CACX,IAAI,EACJ,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,EACjC,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,CACvE,CACF;AACH;AAEM,SAAU,QAAQ,CAAC,KAAwB,EAAA;IAC/C,OAAO,KAAK,CAAC,QAAQ;AACvB;;;;"}
@@ -58,7 +58,7 @@ function FlowSection(_a) {
58
58
  return createElement(FlowItemContainer, columnProps, childNode);
59
59
  }));
60
60
  });
61
- }, [children, layouted$, section.columnMap, renderRange$, id]);
61
+ }, [children, layouted$, section.columnMap, renderRange$]);
62
62
  return createElement(View, { style: sectionStyle, className, id: id !== null && id !== void 0 ? id : section.id }, columns);
63
63
  }
64
64