@tarojs/components-advanced 4.1.12-beta.9 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +0 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/list/index.d.ts +3 -60
- package/dist/components/list/index.js +110 -983
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/virtual-list/vue/list.d.ts +2 -2
- package/dist/components/virtual-waterfall/vue/waterfall.d.ts +1 -1
- package/dist/components/water-flow/interface.d.ts +2 -14
- package/dist/components/water-flow/root.d.ts +1 -11
- package/dist/components/water-flow/root.js +25 -42
- package/dist/components/water-flow/root.js.map +1 -1
- package/dist/components/water-flow/section.d.ts +1 -1
- package/dist/components/water-flow/section.js +2 -2
- package/dist/components/water-flow/section.js.map +1 -1
- package/dist/components/water-flow/utils.d.ts +0 -2
- package/dist/components/water-flow/utils.js +1 -3
- package/dist/components/water-flow/utils.js.map +1 -1
- package/dist/components/water-flow/water-flow.d.ts +1 -2
- package/dist/components/water-flow/water-flow.js +25 -188
- package/dist/components/water-flow/water-flow.js.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +8 -9
- package/dist/components/list/NoMore.d.ts +0 -30
- package/dist/components/list/NoMore.js +0 -10
- package/dist/components/list/NoMore.js.map +0 -1
- package/dist/components/list/hooks/useItemSizeCache.d.ts +0 -13
- package/dist/components/list/hooks/useItemSizeCache.js +0 -40
- package/dist/components/list/hooks/useItemSizeCache.js.map +0 -1
- package/dist/components/list/hooks/useListNestedScroll.d.ts +0 -13
- package/dist/components/list/hooks/useListNestedScroll.js +0 -46
- package/dist/components/list/hooks/useListNestedScroll.js.map +0 -1
- package/dist/components/list/hooks/useListScrollElementAttach.d.ts +0 -21
- package/dist/components/list/hooks/useListScrollElementAttach.js +0 -86
- package/dist/components/list/hooks/useListScrollElementAttach.js.map +0 -1
- package/dist/components/list/hooks/useMeasureStartOffset.d.ts +0 -12
- package/dist/components/list/hooks/useMeasureStartOffset.js +0 -84
- package/dist/components/list/hooks/useMeasureStartOffset.js.map +0 -1
- package/dist/components/list/hooks/useRefresher.d.ts +0 -74
- package/dist/components/list/hooks/useRefresher.js +0 -503
- package/dist/components/list/hooks/useRefresher.js.map +0 -1
- package/dist/components/list/hooks/useResizeObserver.d.ts +0 -26
- package/dist/components/list/hooks/useResizeObserver.js +0 -152
- package/dist/components/list/hooks/useResizeObserver.js.map +0 -1
- package/dist/components/list/hooks/useScrollCorrection.d.ts +0 -19
- package/dist/components/list/hooks/useScrollCorrection.js +0 -73
- package/dist/components/list/hooks/useScrollCorrection.js.map +0 -1
- package/dist/components/list/hooks/useScrollParentAutoFind.d.ts +0 -17
- package/dist/components/list/hooks/useScrollParentAutoFind.js +0 -54
- package/dist/components/list/hooks/useScrollParentAutoFind.js.map +0 -1
- package/dist/components/list/utils.d.ts +0 -16
- package/dist/components/list/utils.js +0 -19
- package/dist/components/list/utils.js.map +0 -1
- package/dist/utils/scrollParent.d.ts +0 -22
- package/dist/utils/scrollParent.js +0 -55
- package/dist/utils/scrollParent.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport { ScrollElementContext } from '@tarojs/components-react'\nimport Taro from '@tarojs/taro'\nimport React from 'react'\n\nimport { useItemSizeCache } from './hooks/useItemSizeCache'\nimport { useListNestedScroll } from './hooks/useListNestedScroll'\nimport { type ListScrollElementAttachRefs, useListScrollElementAttach } from './hooks/useListScrollElementAttach'\nimport { type ListRefresherConfig, DEFAULT_REFRESHER_HEIGHT, useRefresher } from './hooks/useRefresher'\nimport { useResizeObserver } from './hooks/useResizeObserver'\nimport { useScrollCorrection } from './hooks/useScrollCorrection'\nimport ListItem from './ListItem'\nimport NoMore, { type NoMoreProps } from './NoMore'\nimport StickyHeader from './StickyHeader'\nimport StickySection from './StickySection'\nimport { isH5, isWeapp, supportsNativeRefresher } from './utils'\n\n/** 与官方 List.d.ts / ScrollView / harmony 对齐,不增减已有语义;扩展项仅用于高级能力 */\nexport interface ListProps {\n // ===== 与 ScrollView / List.d.ts 一致 =====\n showScrollbar?: boolean\n scrollTop?: number\n scrollX?: boolean\n scrollY?: boolean\n onScroll?: (e: { scrollTop: number, scrollLeft: number }) => void\n onScrollToUpper?: () => void\n onScrollToLower?: () => void\n upperThreshold?: number\n lowerThreshold?: number\n /** 与 ScrollView cacheExtent 对齐(视口外渲染距离),可选 */\n cacheExtent?: number\n /** 与 ScrollView enableBackToTop 对齐 */\n enableBackToTop?: boolean\n /** 与 ScrollView onScrollStart 对齐 */\n onScrollStart?: () => void\n /** 与 ScrollView onScrollEnd 对齐 */\n onScrollEnd?: () => void\n scrollIntoView?: string\n /** 透传给最外层 ScrollView 的 className,便于自定义样式 */\n className?: string\n\n // ===== 与 harmony-cpp ListProps / ListBuilder 对齐 =====\n stickyHeader?: boolean\n space?: number\n cacheCount?: number\n itemData?: any[]\n itemSize?: number | ((index: number, data?: any[]) => number)\n height?: number | string\n width?: number | string\n style?: React.CSSProperties\n children?: React.ReactNode\n headerHeight?: number\n headerWidth?: number\n itemHeight?: number\n itemWidth?: number\n\n // ===== 动态尺寸(与 type=\"dynamic\" 语义对齐)=====\n useResizeObserver?: boolean\n estimatedItemSize?: number\n onItemSizeChange?: (index: number, size: number) => void\n\n // ===== NoMore 底部提示 =====\n showNoMore?: boolean\n noMoreText?: string\n noMoreStyle?: React.CSSProperties\n renderNoMore?: () => React.ReactNode\n\n // ===== 扩展:可见索引回调 =====\n onScrollIndex?: (start: number, end: number) => void\n\n // ===== 与 dynamic/harmony 对齐:List 自身可配置下拉刷新,无需 Refresher 子组件 =====\n /** 是否开启下拉刷新;与 Refresher 子组件二选一或同时存在(Refresher 子覆盖同名字段) */\n refresherEnabled?: boolean\n refresherThreshold?: number\n refresherDefaultStyle?: 'black' | 'white' | 'none'\n refresherBackground?: string\n refresherTriggered?: boolean\n onRefresherPulling?: (e?: { detail?: { deltaY?: number } }) => void\n onRefresherRefresh?: () => void | Promise<void>\n onRefresherRestore?: () => void\n onRefresherAbort?: () => void\n onRefresherWillRefresh?: () => void\n onRefresherStatusChange?: (e?: { detail?: { status?: number, dy?: number } }) => void\n\n // ===== 扩展:嵌套滚动(H5,借鉴 react-virtualized scrollElement)=====\n /** 是否嵌套模式,与 plato 对齐;true=使用父级滚动,需配合 scrollElement 或 Context;不传或 false=default */\n nestedScroll?: boolean\n /** 自定义滚动容器 ref,nestedScroll 模式下从 props 或 Context 获取 */\n scrollElement?: React.RefObject<HTMLElement | null>\n /** 任务 2.3:暴露滚动容器 ref,供内层 List/WaterFlow(nestedScroll)使用 */\n scrollRef?: React.MutableRefObject<HTMLElement | null>\n}\n\nexport interface ListHandle {\n scroll: (options?: {\n top?: number\n left?: number\n }) => void\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\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 */\nexport { ScrollElementContext as ListScrollElementContext } from '@tarojs/components-react'\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 useScrollElementMode,\n needAutoFind,\n autoFindStatus,\n contentWrapperRef,\n } = useListNestedScroll(listType, scrollElement, undefined, isHorizontal)\n const DEFAULT_ITEM_WIDTH = 120\n const DEFAULT_ITEM_HEIGHT = 40\n\n // 滚动状态管理\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n // 生成唯一 List ID(用于小程序 ResizeObserver)\n const listId = React.useMemo(() => `list-${Math.random().toString(36).slice(2, 11)}`, [])\n\n // 渲染偏移量 - 用于计算应该渲染哪些元素\n const [renderOffset, setRenderOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 程序性滚动用的目标偏移;用户滑动期间不更新,避免与原生滚动冲突\n const [scrollViewOffset, setScrollViewOffset] = React.useState(controlledScrollTop ?? 0)\n\n // 用户正在滑动时不再向 ScrollView 传 scrollTop,让滚动完全由原生接管\n const [isUserScrolling, setIsUserScrolling] = React.useState(false)\n // isUserScrolling 的 ref 镜像,供异步上下文读取最新值\n const isUserScrollingRef = React.useRef(false)\n\n const initialContainerLength = typeof (isHorizontal ? width : height) === 'number' ? (isHorizontal ? (width as number) : (height as number)) : 400\n const [containerLength, setContainerLength] = React.useState<number>(initialContainerLength)\n\n // 用容器实际尺寸更新视口长度,避免 props 与 CSS 不一致导致底部空白\n React.useEffect(() => {\n const el = containerRef.current\n if (!el || typeof ResizeObserver === 'undefined') return\n const ro = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { contentRect } = entry\n const measured = isHorizontal ? contentRect.width : contentRect.height\n if (measured > 0) setContainerLength(measured)\n }\n })\n ro.observe(el)\n return () => ro.disconnect()\n }, [isHorizontal])\n\n // 滚动追踪相关refs\n const isScrollingRef = React.useRef(false)\n const lastScrollTopRef = React.useRef(controlledScrollTop ?? 0)\n const scrollDiffListRef = React.useRef<number[]>([0, 0, 0])\n const scrollTimeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n // H5:仅程序性滚动时写回 DOM scrollTop,用户滑动结束后不写回避免卡顿\n const programmaticScrollRef = React.useRef(false)\n // 小程序端程序性滚动冷却期:handleScroll 只更新 renderOffset,避免 scrollIntoView 后被原生回调拉回\n const programmaticCooldownRef = React.useRef(false)\n const programmaticCooldownTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const scrollViewOffsetRef = React.useRef(0)\n // 处理渲染偏移量更新。\n // syncToScrollView=true:程序性滚动,立即同步 scrollViewOffset。\n // syncToScrollView=false:用户滑动,仅更新 renderOffset。weapp 采用 recycle-view 策略:不把用户滑动位置同步到 scrollViewOffset,避免「传滞后值拉回」和「从有到无归顶」。\n const updateRenderOffset = React.useCallback((newOffset: number, syncToScrollView?: boolean, source?: string) => {\n lastScrollTopRef.current = newOffset\n isScrollingRef.current = true\n\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n }\n\n setRenderOffset(newOffset) // 始终更新虚拟列表用到的偏移\n\n if (syncToScrollView) {\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // 小程序:target===sv 时 ScrollView 认为无变化不滚动→白屏;imperative/scrollIntoView 时先传中间值再 RAF 传 target 强制触发\n // target=0 用 +0.01;target>0 用 -0.01(统一 +0.01 到底部会被 clamp 成同值无效)\n const same = isWeapp && Math.abs(scrollViewOffsetRef.current - newOffset) < 1\n const needForce = same && (source === 'imperative' || source === 'scrollIntoView')\n if (needForce) {\n const intermediate = newOffset > 0 ? newOffset - 0.01 : 0.01\n setScrollViewOffset(intermediate)\n requestAnimationFrame(() => {\n setScrollViewOffset(newOffset)\n })\n } else {\n setScrollViewOffset(newOffset)\n }\n programmaticScrollRef.current = true\n if (isWeapp) {\n programmaticCooldownRef.current = true\n if (programmaticCooldownTimerRef.current) {\n clearTimeout(programmaticCooldownTimerRef.current)\n }\n programmaticCooldownTimerRef.current = setTimeout(() => {\n programmaticCooldownRef.current = false\n }, 500)\n }\n } else {\n isUserScrollingRef.current = true\n setIsUserScrolling(true)\n }\n\n scrollTimeoutRef.current = setTimeout(() => {\n isScrollingRef.current = false\n if (!syncToScrollView) {\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // weapp recycle-view 策略:用户滑动结束后不同步 scrollViewOffset,保持 pass 的值不变,避免 从有到无 归顶\n if (!isWeapp) {\n setScrollViewOffset(lastScrollTopRef.current)\n }\n }\n }, isWeapp ? 200 : 150)\n }, [])\n\n // 暴露给外部的实例方法:通过 ref.scroll({ top / left }) 进行程序性滚动\n React.useImperativeHandle(\n ref,\n () => ({\n scroll(options) {\n const targetOffset = resolveScrollTargetOffset(options, isHorizontal)\n const el = effectiveScrollElement?.current\n if (el && isH5) {\n const scrollTarget = targetOffset + effectiveStartOffset\n if (isHorizontal) {\n el.scrollTo({ left: scrollTarget })\n } else {\n el.scrollTo({ top: scrollTarget })\n }\n updateRenderOffset(targetOffset, false, 'scrollElement')\n } else {\n updateRenderOffset(targetOffset, true, 'imperative')\n }\n },\n }),\n [scrollX, effectiveScrollElement, effectiveStartOffset, isH5, isHorizontal, 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 作为直接子组件\n // 过滤掉 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 // 分组模式\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 // 忽略 Refresher 和 NoMore 组件(已在上面提取配置)\n })\n if (defaultItems.length > 0) {\n result.push({ header: null, items: defaultItems, key: 'default' })\n }\n return result\n }, [children])\n\n // 动态尺寸管理\n const defaultEstimatedSize = isHorizontal ? DEFAULT_ITEM_WIDTH : DEFAULT_ITEM_HEIGHT\n const estimatedSize = props.estimatedItemSize ?? defaultEstimatedSize\n\n // 计算总 item 数量(跨所有 section)\n const totalItemCount = React.useMemo(() => {\n return sections.reduce((sum, section) => sum + section.items.length, 0)\n }, [sections])\n\n // 存储元素引用(用于 ResizeObserver)\n const itemRefsRef = React.useRef<Map<number, HTMLElement | null>>(new Map())\n // 存储 header 元素引用(用于 ResizeObserver)\n const headerRefsRef = React.useRef<Map<number, HTMLElement | null>>(new Map())\n // 小程序端:已完成 SelectorQuery 测量的 item 索引集,避免 refCallback 重复触发测量导致无限循环\n const weappMeasuredItemsRef = React.useRef<Set<number>>(new Set())\n // 动态尺寸缓存更新版本:setItemSize 后递增,用于驱动 sectionOffsets/totalLength 与 item 定位重算\n const [sizeCacheVersion, setSizeCacheVersion] = React.useState(0)\n const sizeCacheRafRef = React.useRef<number | null>(null)\n // 小程序端:测量触发 re-render 时,reflow 帧传 eff 并同步 scrollViewOffset,避免下一帧传 0 导致跳变\n const measureScrollProtectRef = React.useRef(false)\n // 动态尺寸缓存\n const sizeCache = useItemSizeCache({\n isHorizontal,\n estimatedItemSize: estimatedSize,\n itemCount: totalItemCount\n })\n\n // header 动态尺寸缓存(sectionIndex -> size)\n const headerSizeCacheRef = React.useRef<Map<number, number>>(new Map())\n\n // 滚动修正的可见起始索引(后续更新)\n const visibleStartIndexRef = React.useRef(0)\n\n // ScrollTop 修正(仅 H5):动高时尺寸变化自动修正 scrollTop\n const scrollCorrectionEnabled = !isWeapp && props.useResizeObserver === true\n const scrollCorrection = useScrollCorrection({\n enabled: scrollCorrectionEnabled,\n visibleStartIndexRef,\n setScrollOffset: (offsetOrUpdater) => {\n const newOffset = typeof offsetOrUpdater === 'function'\n ? offsetOrUpdater(renderOffset)\n : offsetOrUpdater\n updateRenderOffset(newOffset, true, 'scrollCorrection') // 程序性修正需同步到 ScrollView\n }\n })\n const scrollCorrectionRef = React.useRef(scrollCorrection)\n scrollCorrectionRef.current = scrollCorrection\n const onScrollRef = React.useRef(onScroll)\n onScrollRef.current = onScroll\n const onScrollToUpperRef = React.useRef(onScrollToUpper)\n onScrollToUpperRef.current = onScrollToUpper\n const onScrollToLowerRef = React.useRef(onScrollToLower)\n onScrollToLowerRef.current = onScrollToLower\n const thresholdRef = React.useRef({ upper: upperThreshold, lower: lowerThreshold })\n thresholdRef.current = { upper: upperThreshold, lower: lowerThreshold }\n\n // 小程序 + 动高(virtual-list 风格):测量变化后同帧重排,不做程序性 scrollTop 回拉\n const scheduleWeappDynamicReflow = React.useCallback(() => {\n if (!isWeapp || props.useResizeObserver !== true) return\n if (sizeCacheRafRef.current != null) return\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n measureScrollProtectRef.current = true\n setSizeCacheVersion((v) => v + 1)\n })\n }, [isWeapp, props.useResizeObserver])\n\n // ResizeObserver(当启用动态测量时)\n const resizeObserver = useResizeObserver({\n enabled: props.useResizeObserver === true,\n isHorizontal,\n listId,\n onResize: (index, size) => {\n const oldSize = sizeCache.getItemSize(index)\n sizeCache.setItemSize(index, size)\n\n if (Math.abs(oldSize - size) >= 1) {\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }\n\n // 触发 ScrollTop 修正\n scrollCorrection.recordSizeChange(index, oldSize, size)\n\n // 小程序:延迟 onItemSizeChange,避免父组件重渲染导致 List remount\n // H5:直接回调\n if (isWeapp) {\n weappDeferItemSizeChange(index, size, props.onItemSizeChange)\n } else {\n props.onItemSizeChange?.(index, size)\n }\n }\n })\n\n // 工具:获取 header 默认/估算尺寸\n const getDefaultHeaderSize = () => {\n if (isHorizontal) {\n if (typeof props.headerWidth === 'number') return props.headerWidth\n if (typeof props.itemWidth === 'number') return props.itemWidth\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(0, props.itemData) || DEFAULT_ITEM_WIDTH\n return DEFAULT_ITEM_WIDTH\n } else {\n if (typeof props.headerHeight === 'number') return props.headerHeight\n if (typeof props.itemHeight === 'number') return props.itemHeight\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(0, props.itemData) || DEFAULT_ITEM_HEIGHT\n return DEFAULT_ITEM_HEIGHT\n }\n }\n\n // 工具:获取 header 尺寸(支持动态测量)\n const getHeaderSize = React.useCallback((sectionIndex: number) => {\n // 如果启用动态测量,优先从缓存读取\n if (props.useResizeObserver === true) {\n const cached = headerSizeCacheRef.current.get(sectionIndex)\n if (cached != null && cached > 0) return cached\n }\n // 否则返回默认尺寸\n return getDefaultHeaderSize()\n }, [props.useResizeObserver, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData, isHorizontal])\n\n // 工具:获取 item 尺寸,支持函数/props/默认值/动态测量\n const getItemSize = React.useCallback((index: number) => {\n // 优先级1:如果启用动态测量,从缓存读取\n if (props.useResizeObserver === true) {\n return sizeCache.getItemSize(index)\n }\n\n // 优先级2:固定尺寸或函数计算\n if (isHorizontal) {\n if (typeof props.itemWidth === 'number') return props.itemWidth\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(index, props.itemData) || DEFAULT_ITEM_WIDTH\n return DEFAULT_ITEM_WIDTH\n } else {\n if (typeof props.itemHeight === 'number') return props.itemHeight\n if (typeof props.itemSize === 'number') return props.itemSize\n if (typeof props.itemSize === 'function') return props.itemSize(index, props.itemData) || DEFAULT_ITEM_HEIGHT\n return DEFAULT_ITEM_HEIGHT\n }\n }, [props.useResizeObserver, props.itemWidth, props.itemHeight, props.itemSize, props.itemData, isHorizontal, sizeCache])\n\n // 分组累积高度/宽度,sizeCacheVersion 变化时重算\n const sectionOffsets = React.useMemo(() => {\n const offsets: number[] = [0]\n let globalItemIndex = 0 // 累加全局索引\n\n sections.forEach((section, sectionIdx) => {\n const headerSize = getHeaderSize(sectionIdx)\n // 使用全局索引计算每个 item 的尺寸\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\n // 累加当前 section 的 item 数量\n globalItemIndex += section.items.length\n })\n return offsets\n }, [sections, space, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData, getItemSize, getHeaderSize, sizeCacheVersion])\n\n // 外层虚拟滚动:可见分组\n const [startSection, endSection] = React.useMemo(() => {\n let start = 0; let end = sections.length - 1\n for (let i = 0; i < sections.length; i++) {\n if (sectionOffsets[i + 1] > renderOffset) {\n start = Math.max(0, i - cacheCount)\n break\n }\n }\n for (let i = start; i < sections.length; i++) {\n if (sectionOffsets[i] >= renderOffset + containerLength) {\n end = Math.min(sections.length - 1, i + cacheCount)\n break\n }\n }\n return [start, end]\n }, [renderOffset, containerLength, sectionOffsets, sections.length, cacheCount])\n\n // 视口内可见 item 的全局索引范围(供 onScrollIndex)\n const [visibleStartItem, visibleEndItem] = React.useMemo(() => {\n const viewportTop = renderOffset\n const viewportBottom = renderOffset + containerLength\n let firstVisible = -1\n let lastVisible = -1\n let globalIndex = 0\n\n for (let s = 0; s < sections.length; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize(s)\n const sectionStart = sectionOffsets[s] + (section.header ? headerSize : 0)\n let itemTop = sectionStart\n\n for (let i = 0; i < section.items.length; i++) {\n const itemSize = getItemSize(globalIndex)\n const itemBottom = itemTop + itemSize\n // 判断 item 本身(不含 space)是否与视口相交\n if (itemBottom > viewportTop && itemTop < viewportBottom) {\n if (firstVisible < 0) firstVisible = globalIndex\n lastVisible = globalIndex\n }\n // 下一个 item 的起始位置 = 当前 item 结束 + space\n itemTop = itemBottom + space\n globalIndex++\n }\n }\n\n if (firstVisible < 0 || lastVisible < 0) return [0, 0]\n return [firstVisible, lastVisible]\n }, [renderOffset, containerLength, sections, sectionOffsets, getHeaderSize, getItemSize, space])\n\n // 触发 onScrollIndex 回调(带防重复)\n const lastVisibleRangeRef = React.useRef({ start: -1, end: -1 })\n React.useEffect(() => {\n if (props.onScrollIndex) {\n // 避免重复触发\n if (lastVisibleRangeRef.current.start !== visibleStartItem ||\n lastVisibleRangeRef.current.end !== visibleEndItem) {\n lastVisibleRangeRef.current = { start: visibleStartItem, end: visibleEndItem }\n props.onScrollIndex(visibleStartItem, visibleEndItem)\n }\n }\n }, [visibleStartItem, visibleEndItem, props.onScrollIndex])\n\n const handleScroll = React.useCallback((e: any) => {\n let newOffset: number\n if (e.detail) {\n newOffset = isHorizontal ? e.detail.scrollLeft : e.detail.scrollTop\n } else {\n newOffset = isHorizontal ? e.scrollLeft : e.scrollTop\n }\n\n const effectiveOffset = newOffset\n const diff = effectiveOffset - lastScrollTopRef.current\n scrollDiffListRef.current.shift()\n scrollDiffListRef.current.push(diff)\n const shaking = isScrollingRef.current && isShaking(scrollDiffListRef.current)\n if (shaking) return\n\n if (programmaticCooldownRef.current) {\n lastScrollTopRef.current = effectiveOffset\n setRenderOffset(effectiveOffset)\n onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\n return\n }\n\n scrollCorrection.markUserScrolling()\n updateRenderOffset(effectiveOffset, false, 'onScroll')\n\n onScroll?.({\n scrollTop: isHorizontal ? 0 : newOffset,\n scrollLeft: isHorizontal ? newOffset : 0\n })\n }, [isHorizontal, onScroll, updateRenderOffset, scrollCorrection, props.useResizeObserver])\n\n // 小程序:onScrollEnd 优先结束 isUserScrolling,timeout 兜底\n const handleNativeScrollEnd = React.useCallback(() => {\n if (isWeapp) {\n if (scrollTimeoutRef.current) {\n clearTimeout(scrollTimeoutRef.current)\n scrollTimeoutRef.current = null\n }\n if (isUserScrollingRef.current) {\n isScrollingRef.current = false\n isUserScrollingRef.current = false\n setIsUserScrolling(false)\n // recycle-view 策略:不把用户滑动位置同步到 scrollViewOffset\n }\n }\n onScrollEnd?.()\n }, [isWeapp, onScrollEnd])\n\n // 任务 2.3:暴露 scrollRef 给父组件(供内层 List/WaterFlow 传入 scrollElement)\n // 收敛到此处统一赋值,不再在 ResizeObserver 中重复\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 updateRenderOffset(targetOffset, true, 'scrollIntoView')\n // scrollElement 模式下需显式滚动外部容器,否则仅 updateRenderOffset 不会滚动 div\n if (useScrollElementMode && effectiveScrollElement?.current && isH5) {\n const el = effectiveScrollElement.current\n const scrollTarget = targetOffset + effectiveStartOffset\n if (isHorizontal) {\n el.scrollTo({ left: scrollTarget })\n } else {\n el.scrollTo({ top: scrollTarget })\n }\n }\n }\n }, [props.scrollIntoView, totalItemCount, sections, getHeaderSize, getItemSize, space, updateRenderOffset, useScrollElementMode, effectiveScrollElement, effectiveStartOffset, isH5, isHorizontal])\n\n // 容器样式;H5 刷新中禁止滚动\n const containerStyle: React.CSSProperties = {\n position: 'relative',\n boxSizing: 'border-box',\n height,\n width,\n ...style,\n ...(isH5 && refresherConfig && !supportsNativeRefresher && h5RefresherProps.isRefreshing\n ? { overflow: 'hidden' as const }\n : {}),\n }\n\n // ScrollView 属性\n const scrollViewProps: Record<string, unknown> = {\n scrollY: !scrollX && scrollY,\n scrollX,\n style: containerStyle,\n className,\n enhanced: true,\n showScrollbar,\n upperThreshold,\n lowerThreshold,\n scrollWithAnimation: false,\n onScroll: handleScroll,\n onScrollToUpper,\n onScrollToLower,\n onScrollStart,\n onScrollEnd: handleNativeScrollEnd,\n enableBackToTop,\n // 小程序端:开启滚动锚定,防止虚拟列表子节点通过 setData 更新时原生 scroll-view 重置滚动位置\n ...(isWeapp ? { scrollAnchoring: true } : {}),\n ...(typeof cacheExtent === 'number' ? { cacheExtent } : {}),\n\n ...scrollViewRefresherProps,\n ...scrollViewRefresherHandlers,\n }\n\n // H5 对齐小程序:refresherTriggered=true 时顶部立即显示加载指示器,滚到顶部并锁定滚动直至设为 false\n React.useEffect(() => {\n if (!isH5 || !refresherConfig || supportsNativeRefresher || !h5RefresherProps.isRefreshing) return\n updateRenderOffset(0, true, 'refresher')\n }, [h5RefresherProps.isRefreshing, isH5, refresherConfig, supportsNativeRefresher, updateRenderOffset])\n\n // H5 下拉刷新:ref 存 addImperativeTouchListeners,避免 config 变化导致 effect 循环\n React.useLayoutEffect(() => {\n const attach = addImperativeTouchListenersRef.current\n if (!attach) return\n let teardown: (() => void) | null = null\n const tryAttach = () => {\n const el = useScrollElementMode ? effectiveScrollElement?.current : containerRef.current\n if (el && !refresherTeardownRef.current) {\n teardown = attach(el)\n refresherTeardownRef.current = teardown\n }\n }\n tryAttach()\n const rafId = requestAnimationFrame(tryAttach)\n return () => {\n cancelAnimationFrame(rafId)\n if (teardown) {\n teardown()\n }\n refresherTeardownRef.current = null\n }\n }, [useScrollElementMode, effectiveScrollElement])\n\n scrollViewOffsetRef.current = scrollViewOffset\n // scrollTop:weapp 传 scrollViewOffset(reflow 帧传 eff 防跳变);H5 仅非用户滑动时传\n if (isWeapp) {\n if (measureScrollProtectRef.current) {\n measureScrollProtectRef.current = false\n const eff = lastScrollTopRef.current\n setScrollViewOffset(eff)\n if (isHorizontal) {\n scrollViewProps.scrollLeft = eff\n } else {\n scrollViewProps.scrollTop = eff\n }\n programmaticScrollRef.current = false\n } else {\n const sv = scrollViewOffset\n if (isHorizontal) {\n scrollViewProps.scrollLeft = sv\n } else {\n scrollViewProps.scrollTop = sv\n }\n programmaticScrollRef.current = false\n }\n } else {\n // H5:非用户滑动时传\n if (!isUserScrolling) {\n if (isHorizontal) {\n scrollViewProps.scrollLeft = scrollViewOffset\n } else {\n scrollViewProps.scrollTop = scrollViewOffset\n }\n }\n }\n\n // H5:程序性滚动时写回 DOM scrollTop\n React.useEffect(() => {\n if (!isH5) return\n if (isUserScrolling || !containerRef.current || typeof scrollViewOffset !== 'number') return\n if (!programmaticScrollRef.current) return\n const scrollValue = scrollViewOffset\n if (isHorizontal) {\n containerRef.current.scrollLeft = scrollValue\n } else {\n containerRef.current.scrollTop = scrollValue\n }\n programmaticScrollRef.current = false\n }, [isH5, scrollViewOffset, isHorizontal, isUserScrolling])\n\n // 总高度/宽度(含 NoMore)\n const noMoreHeight = noMoreConfig?.visible ? (noMoreConfig.height || 60) : 0\n const listContentLength = sectionOffsets[sectionOffsets.length - 1] + noMoreHeight\n const totalLength = listContentLength\n\n // scrollElement 模式下 onScrollToLower 需用内层内容高度判断,供 scroll handler 读取\n const listContentLengthRef = React.useRef(0)\n listContentLengthRef.current = listContentLength\n\n const scrollAttachRefsRef = React.useRef<ListScrollElementAttachRefs | null>(null)\n scrollAttachRefsRef.current = {\n scrollCorrection: scrollCorrectionRef.current,\n onScroll: onScrollRef.current,\n onScrollToUpper: onScrollToUpperRef.current,\n onScrollToLower: onScrollToLowerRef.current,\n threshold: thresholdRef.current,\n listContentLength: listContentLengthRef.current,\n }\n useListScrollElementAttach(\n useScrollElementMode && isH5,\n effectiveScrollElement,\n effectiveStartOffset,\n isHorizontal,\n setContainerLength,\n updateRenderOffset,\n scrollRefProp,\n scrollAttachRefsRef\n )\n\n // 吸顶/吸左 header\n const stickyHeaderNode = React.useMemo(() => {\n if (!stickyHeader) return null\n for (let i = 0; i < sections.length; i++) {\n if (sectionOffsets[i] <= renderOffset && renderOffset < sectionOffsets[i + 1]) {\n const section = sections[i]\n if (section.header) {\n // 吸顶 header 不设固定 height/width,由内容撑开,避免「外部 60px 容器 + 实际内容 40+px」导致 header 内空白\n const stickyHeaderStyle: React.CSSProperties = {\n position: 'sticky',\n top: 0,\n left: 0,\n zIndex: 100,\n background: '#fff',\n boxSizing: 'border-box',\n minHeight: 20,\n overflow: 'hidden',\n lineHeight: 1\n }\n return (\n <View style={stickyHeaderStyle}>\n {section.header}\n </View>\n )\n }\n }\n }\n return null\n }, [stickyHeader, renderOffset, sectionOffsets, sections, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData])\n\n // 渲染分组+item双层虚拟滚动\n const renderSections = () => {\n const nodes: React.ReactNode[] = []\n let offset = sectionOffsets[startSection]\n let globalItemIndex = 0 // 全局 item 索引(跨 section)\n\n // 计算起始 section 之前的所有 item 数量\n for (let s = 0; s < startSection; s++) {\n globalItemIndex += sections[s].items.length\n }\n\n for (let s = startSection; s <= endSection; s++) {\n const section = sections[s]\n const headerSize = getHeaderSize(s)\n const itemSizes = section.items.map((_, i) => getItemSize(globalItemIndex + i))\n // header\n if (section.header) {\n const sectionIndex = s\n // 动态测量时外层定位容器不设固定高度,由内层撑开\n const sectionHeaderStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 2,\n boxSizing: 'border-box',\n width: '100%',\n minHeight: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal\n ? { top: 0, height: '100%', left: offset, width: props.useResizeObserver ? undefined : headerSize }\n : { top: offset, height: props.useResizeObserver ? undefined : headerSize })\n }\n\n // header ref 回调(用于 ResizeObserver 测量)\n const headerRefCallback = props.useResizeObserver ? (el: HTMLElement | null) => {\n if (el) {\n headerRefsRef.current.set(sectionIndex, el)\n resizeObserver.observe(el, -sectionIndex - 1) // 用负数索引区分 header 和 item\n const measureAndUpdateHeader = (measured: number) => {\n if (measured > 0) {\n const oldSize = headerSizeCacheRef.current.get(sectionIndex) ?? getDefaultHeaderSize()\n if (Math.abs(oldSize - measured) >= 1) {\n headerSizeCacheRef.current.set(sectionIndex, measured)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n }\n }\n }\n if (isH5) {\n requestAnimationFrame(() => {\n if (!headerRefsRef.current.has(sectionIndex)) return\n const rect = el.getBoundingClientRect()\n measureAndUpdateHeader(isHorizontal ? rect.width : rect.height)\n })\n } else if (isWeapp) {\n Taro.nextTick(() => {\n if (!headerRefsRef.current.has(sectionIndex)) return\n Taro.createSelectorQuery()\n .select(`#${listId}-list-header-inner-${sectionIndex}`)\n .boundingClientRect((rect: any) => {\n if (rect) {\n measureAndUpdateHeader(isHorizontal ? rect.width : rect.height)\n }\n })\n .exec()\n })\n }\n } else {\n const oldEl = headerRefsRef.current.get(sectionIndex)\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n headerRefsRef.current.delete(sectionIndex)\n }\n }\n } : undefined\n\n // 动态尺寸时:外层定位,内层撑开以便测量\n const headerContentStyle: React.CSSProperties = props.useResizeObserver\n ? (\n isHorizontal\n // weapp 下 max-content 兼容性不稳定,改用 inline-flex 收缩包裹以测得真实宽度\n ? (isWeapp\n ? { boxSizing: 'border-box', display: 'inline-flex', height: '100%' }\n : { boxSizing: 'border-box', width: 'max-content', height: '100%' })\n : { boxSizing: 'border-box', width: '100%' }\n )\n : {}\n\n if (props.useResizeObserver) {\n const headerInnerProps: any = {\n ref: headerRefCallback,\n style: headerContentStyle,\n 'data-index': String(-sectionIndex - 1), // 用于 unobserve 获取 index;与 observe(el, -sectionIndex-1) 对应\n }\n if (isWeapp) {\n headerInnerProps.id = `${listId}-list-header-inner-${sectionIndex}`\n }\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, React.createElement(View, headerInnerProps, section.header))\n )\n } else {\n nodes.push(\n React.createElement(View, {\n key: section.key + '-header',\n style: sectionHeaderStyle,\n }, section.header)\n )\n }\n offset += headerSize\n }\n // item offsets\n const itemOffsets = accumulate(itemSizes.map((size) => size + space))\n // 内层虚拟滚动:可见item区间\n let startItem = 0; let endItem = section.items.length - 1\n for (let i = 0; i < section.items.length; i++) {\n if (offset + itemOffsets[i + 1] > renderOffset) {\n startItem = Math.max(0, i - cacheCount)\n break\n }\n }\n for (let i = startItem; i < section.items.length; i++) {\n if (offset + itemOffsets[i] >= renderOffset + containerLength) {\n endItem = Math.min(section.items.length - 1, i + cacheCount)\n break\n }\n }\n\n // 更新可见起始索引(用于 ScrollCorrection)\n if (s === startSection && startItem === 0) {\n visibleStartIndexRef.current = globalItemIndex\n } else if (s === startSection) {\n visibleStartIndexRef.current = globalItemIndex + startItem\n }\n\n // 渲染可见item\n for (let i = startItem; i <= endItem; i++) {\n const currentGlobalIndex = globalItemIndex + i\n const itemId = `list-item-${currentGlobalIndex}`\n\n const sectionItemStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 1,\n boxSizing: 'border-box',\n width: '100%',\n minHeight: '20px',\n overflow: 'hidden',\n lineHeight: 1,\n ...(isHorizontal\n ? {\n top: 0,\n height: '100%',\n left: offset + itemOffsets[i],\n width: itemSizes[i],\n marginRight: space\n }\n : {\n top: offset + itemOffsets[i],\n height: itemSizes[i],\n marginBottom: space\n })\n }\n\n // ResizeObserver:绑定内层内容容器测量真实尺寸,尺寸变化时才 bump 版本\n const refCallback = (el: HTMLElement | null) => {\n if (el) {\n const capturedIndex = currentGlobalIndex\n itemRefsRef.current.set(capturedIndex, el)\n resizeObserver.observe(el, capturedIndex)\n\n // H5:使用 getBoundingClientRect 进行 fallback 测量\n // 小程序:使用 SelectorQuery 进行 fallback 测量(小程序没有 getBoundingClientRect)\n const measureAndUpdate = (measured: number) => {\n if (measured > 0) {\n const oldSize = sizeCache.getItemSize(capturedIndex)\n if (Math.abs(oldSize - measured) < 1) return\n sizeCache.setItemSize(capturedIndex, measured)\n scrollCorrection.recordSizeChange(capturedIndex, oldSize, measured)\n if (isWeapp && props.useResizeObserver === true) {\n scheduleWeappDynamicReflow()\n } else if (sizeCacheRafRef.current == null) {\n sizeCacheRafRef.current = requestAnimationFrame(() => {\n sizeCacheRafRef.current = null\n setSizeCacheVersion((v) => v + 1)\n })\n }\n // 小程序:延迟 onItemSizeChange,避免父组件重渲染导致 List remount\n if (isWeapp) {\n weappDeferItemSizeChange(capturedIndex, measured, props.onItemSizeChange)\n } else {\n props.onItemSizeChange?.(capturedIndex, measured)\n }\n }\n }\n\n if (isH5) {\n requestAnimationFrame(() => {\n if (!itemRefsRef.current.has(capturedIndex)) return\n const rect = el.getBoundingClientRect()\n measureAndUpdate(isHorizontal ? rect.width : rect.height)\n })\n } else if (isWeapp) {\n // 小程序端:使用 SelectorQuery 测量内层内容容器的实际尺寸\n // 注意:必须选 inner 容器(无固定高度,由内容撑开),不能选 outer(有虚拟列表设置的固定高度)\n // 已测量过的 item 跳过,避免 refCallback 重复触发导致无限循环\n // 滚动期间跳过 SelectorQuery(不加入 weappMeasuredItemsRef),避免异步查询干扰 scroll-view\n // SelectorQuery 是只读查询,滚动期间执行安全\n if (shouldMeasureWeappItem(capturedIndex, weappMeasuredItemsRef.current)) {\n weappMeasuredItemsRef.current.add(capturedIndex)\n // 使用 Taro.nextTick 代替 setTimeout(50):等待下一帧渲染完成后再测量\n // 比固定延时更快(减少\"预估→实测\"闪烁)且更可靠(保证 DOM 已更新)\n Taro.nextTick(() => {\n if (!itemRefsRef.current.has(capturedIndex)) return\n Taro.createSelectorQuery()\n // 页面上可能同时存在多个 List,inner id 必须带 listId 前缀避免跨列表误命中\n .select(`#${listId}-list-item-inner-${capturedIndex}`)\n .boundingClientRect((rect: any) => {\n if (rect) {\n measureAndUpdate(isHorizontal ? rect.width : rect.height)\n }\n })\n .exec()\n })\n }\n }\n } else {\n const oldEl = itemRefsRef.current.get(currentGlobalIndex)\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n itemRefsRef.current.delete(currentGlobalIndex)\n }\n }\n }\n\n // 动态尺寸时:外层负责定位,内层由内容撑开以便测量真实尺寸。\n // 纵向:内层 width:100% 无 height,由内容撑开,测到的是内容高度。\n // 横向:width:max-content + height:100%:\n // - width:max-content 便于测量真实宽度;\n // - height:100% 让测量层与外层 slot 条带高度一致,避免「外层条带 180px、内层 wrapper 只有内容高度」导致的内外高度差。\n const contentWrapperStyle: React.CSSProperties = props.useResizeObserver\n ? (\n isHorizontal\n // weapp 下 max-content 兼容性不稳定,改用 inline-flex 收缩包裹以测得真实宽度\n ? (isWeapp\n ? { boxSizing: 'border-box', display: 'inline-flex', height: '100%' }\n : { boxSizing: 'border-box', width: 'max-content', height: '100%' })\n : { boxSizing: 'border-box', width: '100%' }\n )\n : {}\n\n const outerItemProps: any = {\n key: section.key + '-item-' + i,\n id: itemId,\n style: sectionItemStyle,\n }\n\n if (props.useResizeObserver) {\n const innerProps: any = {\n ref: refCallback,\n style: contentWrapperStyle,\n }\n // 小程序端需要 id 用于 SelectorQuery 测量内容真实尺寸;H5 端不需要(用 getBoundingClientRect)\n if (isWeapp) {\n // 页面内多 List 并存时避免 id 冲突(例如 demo 同页含多个 List)\n innerProps.id = `${listId}-list-item-inner-${currentGlobalIndex}`\n }\n innerProps['data-index'] = String(currentGlobalIndex)\n const itemNode = React.createElement(View, outerItemProps, React.createElement(View, innerProps, section.items[i]))\n // 任务 4.1:当 List 暴露 scrollRef 时,为每个 item 提供 Context,供内层 WaterFlow 使用\n const itemWithContext = scrollRefProp && !useScrollElementMode\n ? React.createElement(ScrollElementContext.Provider, {\n key: outerItemProps.key,\n value: {\n scrollRef: scrollRefProp,\n containerHeight: containerLength,\n startOffset: offset + itemOffsets[i],\n reportNestedHeightChange: props.useResizeObserver\n ? (height: number) => {\n if (height <= 0) return\n const idx = currentGlobalIndex\n const estimatedHeader = estimatedSize * 0.5\n const fullHeight = height + estimatedHeader\n const oldSize = sizeCache.getItemSize(idx)\n if (Math.abs(oldSize - fullHeight) < 1) return\n sizeCache.setItemSize(idx, fullHeight)\n scrollCorrection.recordSizeChange(idx, 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 }\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(ScrollElementContext.Provider, {\n key: outerItemProps.key,\n value: {\n scrollRef: scrollRefProp,\n containerHeight: containerLength,\n startOffset: offset + itemOffsets[i],\n reportNestedHeightChange: props.useResizeObserver\n ? (height: number) => {\n if (height <= 0) return\n const idx = currentGlobalIndex\n const estimatedHeader = estimatedSize * 0.5\n const fullHeight = height + estimatedHeader\n const oldSize = sizeCache.getItemSize(idx)\n if (Math.abs(oldSize - fullHeight) < 1) return\n sizeCache.setItemSize(idx, fullHeight)\n scrollCorrection.recordSizeChange(idx, 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 }\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} 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":";;;;;;;;;;;;;;;;;;AAoGA;AACM,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;AAEA;AACM,SAAU,SAAS,CAAC,QAAkB,EAAA;AAC1C,IAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;;AAGrC,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;I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|
|
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,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;AAEA;AACM,SAAU,SAAS,CAAC,QAAkB,EAAA;AAC1C,IAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;;AAGrC,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,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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;;;;"}
|
|
@@ -480,14 +480,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
480
480
|
onScrollNative: FunctionConstructor;
|
|
481
481
|
onItemsRendered: FunctionConstructor;
|
|
482
482
|
}>>, {
|
|
483
|
-
position: string;
|
|
484
483
|
layout: string;
|
|
484
|
+
position: string;
|
|
485
485
|
direction: string;
|
|
486
|
-
enhanced: boolean;
|
|
487
486
|
unlimitedSize: boolean;
|
|
488
487
|
initialScrollOffset: number;
|
|
489
488
|
overscanCount: number;
|
|
490
489
|
useIsScrolling: boolean;
|
|
490
|
+
enhanced: boolean;
|
|
491
491
|
outerElementType: string;
|
|
492
492
|
innerElementType: string;
|
|
493
493
|
itemElementType: string;
|
|
@@ -449,11 +449,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
449
449
|
onItemsRendered: FunctionConstructor;
|
|
450
450
|
}>>, {
|
|
451
451
|
position: string;
|
|
452
|
-
enhanced: boolean;
|
|
453
452
|
unlimitedSize: boolean;
|
|
454
453
|
initialScrollOffset: number;
|
|
455
454
|
placeholderCount: number;
|
|
456
455
|
useIsScrolling: boolean;
|
|
456
|
+
enhanced: boolean;
|
|
457
457
|
outerElementType: string;
|
|
458
458
|
innerElementType: string;
|
|
459
459
|
itemElementType: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ScrollViewProps } from '@tarojs/components';
|
|
2
2
|
import { Node } from './node';
|
|
3
|
-
import type { CSSProperties
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
4
|
export interface BaseProps {
|
|
5
5
|
id?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
}
|
|
9
|
-
export interface WaterFlowProps extends Omit<ScrollViewProps, 'cacheExtent' | 'upperThreshold' | 'lowerThreshold' | 'style'
|
|
9
|
+
export interface WaterFlowProps extends Omit<ScrollViewProps, 'cacheExtent' | 'upperThreshold' | 'lowerThreshold' | 'style'>, Pick<BaseProps, 'style'> {
|
|
10
10
|
/**
|
|
11
11
|
* 距顶部多少个FlowItem时,触发 scrolltoupper 事件
|
|
12
12
|
* @default 0
|
|
@@ -22,18 +22,6 @@ export interface WaterFlowProps extends Omit<ScrollViewProps, 'cacheExtent' | 'u
|
|
|
22
22
|
* @default 50
|
|
23
23
|
*/
|
|
24
24
|
cacheCount?: number;
|
|
25
|
-
/** 是否嵌套模式,与 plato 对齐;true=使用父级滚动,需配合 scrollElement 或 Context;不传或 false=default */
|
|
26
|
-
nestedScroll?: boolean;
|
|
27
|
-
/** 自定义滚动容器 ref,nestedScroll 模式下从 props 或 Context 获取 */
|
|
28
|
-
scrollElement?: RefObject<HTMLElement | null>;
|
|
29
|
-
/** WaterFlow 内容在滚动容器中的起始偏移(上方有其他内容时使用) */
|
|
30
|
-
startOffset?: number;
|
|
31
|
-
/** 可视区高度,scrollElement 模式下可选,不传则从 scrollElement.clientHeight 获取 */
|
|
32
|
-
containerHeight?: number;
|
|
33
|
-
/** 任务 4.2:瀑布流内容高度变化时回调(便于 List 动高联动,避免底部空白) */
|
|
34
|
-
onScrollHeightChange?: (height: number) => void;
|
|
35
|
-
/** scrollIntoView 滚动完成后回调,便于父组件清空 scrollIntoView 以支持重复点击同一目标 */
|
|
36
|
-
onScrollIntoViewComplete?: () => void;
|
|
37
25
|
}
|
|
38
26
|
export interface FlowSectionProps extends BaseProps {
|
|
39
27
|
/**
|
|
@@ -2,10 +2,7 @@ import { Node } from './node';
|
|
|
2
2
|
import { Section } from './section';
|
|
3
3
|
import { StatefulEventBus } from './stateful-event-bus';
|
|
4
4
|
import type { BaseProps, ScrollDirection, Size, WaterFlowProps } from './interface';
|
|
5
|
-
export type RootProps = Pick<WaterFlowProps, 'cacheCount' | 'lowerThresholdCount' | 'upperThresholdCount'> & Required<Pick<BaseProps, 'id'
|
|
6
|
-
/** scrollElement 模式下为 true,不测量自有容器;此时需布局全部 section 以展开完整高度 */
|
|
7
|
-
skipContainerMeasure?: boolean;
|
|
8
|
-
};
|
|
5
|
+
export type RootProps = Pick<WaterFlowProps, 'cacheCount' | 'lowerThresholdCount' | 'upperThresholdCount'> & Required<Pick<BaseProps, 'id'>>;
|
|
9
6
|
type RootState = {
|
|
10
7
|
/** 是否在滚动中 */
|
|
11
8
|
isScrolling: boolean;
|
|
@@ -68,12 +65,6 @@ export declare class Root extends StatefulEventBus<RootState, Events> {
|
|
|
68
65
|
* 触发滚动阈值对应的 scrollTop 值
|
|
69
66
|
*/
|
|
70
67
|
lowerThresholdScrollTop: number;
|
|
71
|
-
/** scrollElement 模式下为 true,需布局全部 section 以展开完整高度供父容器滚动 */
|
|
72
|
-
skipContainerMeasure: boolean;
|
|
73
|
-
/** 当前是否处于触顶区域;初始为 true(起始在顶部),只有从 false→true 时才触发事件 */
|
|
74
|
-
private _inUpperZone;
|
|
75
|
-
/** 当前是否处于触底区域;初始为 false */
|
|
76
|
-
private _inLowerZone;
|
|
77
68
|
constructor(props: RootProps);
|
|
78
69
|
/**
|
|
79
70
|
* 设置订阅事件
|
|
@@ -103,7 +94,6 @@ export declare class Root extends StatefulEventBus<RootState, Events> {
|
|
|
103
94
|
/**
|
|
104
95
|
* 处理滚动到阈值的情况
|
|
105
96
|
* 检测当前滚动位置是否达到了上下阈值,并触发相应的事件
|
|
106
|
-
* scrollElement 模式:scrollOffset 为内容内偏移(scrollTop - startOffset),upper/lowerThresholdScrollTop 基于本组件内容计算,触顶/触底以本 WaterFlow 内容为基准
|
|
107
97
|
*/
|
|
108
98
|
private handleReachThreshold;
|
|
109
99
|
/**
|
|
@@ -18,7 +18,7 @@ const RootEvents = {
|
|
|
18
18
|
*/
|
|
19
19
|
class Root extends StatefulEventBus {
|
|
20
20
|
constructor(props) {
|
|
21
|
-
const { id, cacheCount, lowerThresholdCount, upperThresholdCount
|
|
21
|
+
const { id, cacheCount, lowerThresholdCount, upperThresholdCount } = props;
|
|
22
22
|
super({
|
|
23
23
|
isScrolling: false,
|
|
24
24
|
scrollOffset: 0,
|
|
@@ -56,28 +56,19 @@ class Root extends StatefulEventBus {
|
|
|
56
56
|
* 触发滚动阈值对应的 scrollTop 值
|
|
57
57
|
*/
|
|
58
58
|
this.lowerThresholdScrollTop = Infinity;
|
|
59
|
-
/** scrollElement 模式下为 true,需布局全部 section 以展开完整高度供父容器滚动 */
|
|
60
|
-
this.skipContainerMeasure = false;
|
|
61
|
-
/** 当前是否处于触顶区域;初始为 true(起始在顶部),只有从 false→true 时才触发事件 */
|
|
62
|
-
this._inUpperZone = true;
|
|
63
|
-
/** 当前是否处于触底区域;初始为 false */
|
|
64
|
-
this._inLowerZone = false;
|
|
65
59
|
Object.assign(this, {
|
|
66
60
|
id,
|
|
67
61
|
cacheCount,
|
|
68
62
|
lowerThresholdCount,
|
|
69
63
|
upperThresholdCount,
|
|
70
|
-
skipContainerMeasure: !!skipContainerMeasure,
|
|
71
64
|
});
|
|
72
65
|
this.setupSubscriptions();
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
height,
|
|
78
|
-
});
|
|
66
|
+
getRectSizeSync(`#${id}`, 100).then(({ width = windowWidth, height = windowHeight }) => {
|
|
67
|
+
this.setStateIn('containerSize', {
|
|
68
|
+
width,
|
|
69
|
+
height,
|
|
79
70
|
});
|
|
80
|
-
}
|
|
71
|
+
});
|
|
81
72
|
this.renderInitialLayout();
|
|
82
73
|
}
|
|
83
74
|
/**
|
|
@@ -91,23 +82,22 @@ class Root extends StatefulEventBus {
|
|
|
91
82
|
this.sub('scrollOffset', () => {
|
|
92
83
|
this.setStateIn('renderRange', this.getSectionRenderRange());
|
|
93
84
|
this.handleReachThreshold();
|
|
94
|
-
this.
|
|
85
|
+
if (this.getState().scrollDirection === 'forward') {
|
|
86
|
+
this.updateScrollHeight();
|
|
87
|
+
}
|
|
95
88
|
});
|
|
96
89
|
this.sub('scrollOffset', () => {
|
|
97
90
|
const sectionSize = this.sections.length;
|
|
98
91
|
const lastSection = this.sections[sectionSize - 1];
|
|
99
92
|
// 最后一个分组的每一列最后一行都已经完成了布局计算,那么这个时候的总高度应该是准确的
|
|
100
|
-
if (lastSection
|
|
93
|
+
if (lastSection.columnMap.every((column) => column[column.length - 1].getState().layouted)) {
|
|
101
94
|
this.setLowerThresholdScrollTop();
|
|
102
95
|
}
|
|
103
96
|
});
|
|
104
97
|
this.sub(RootEvents.AllSectionsLayouted, () => {
|
|
105
|
-
this.updateScrollHeight();
|
|
106
98
|
this.setUpperThresholdScrollTop();
|
|
107
|
-
this.setLowerThresholdScrollTop();
|
|
108
99
|
});
|
|
109
100
|
this.sub(RootEvents.Resize, () => {
|
|
110
|
-
this.updateScrollHeight();
|
|
111
101
|
this.setUpperThresholdScrollTop();
|
|
112
102
|
this.setLowerThresholdScrollTop();
|
|
113
103
|
});
|
|
@@ -132,10 +122,8 @@ class Root extends StatefulEventBus {
|
|
|
132
122
|
const section = this.sections[i];
|
|
133
123
|
section.layoutedSignal.promise.then(() => {
|
|
134
124
|
this.setStateIn('renderRange', [0, i + 1 > sectionSize ? sectionSize - 1 : i + 1]);
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
if (!this.skipContainerMeasure &&
|
|
138
|
-
section.getState().scrollTop > this.getState().containerSize.height) {
|
|
125
|
+
// 容器可视区域已经填满了,没必要再继续
|
|
126
|
+
if (section.getState().scrollTop > this.getState().containerSize.height) {
|
|
139
127
|
this.pub(RootEvents.InitialRenderCompleted, section);
|
|
140
128
|
return;
|
|
141
129
|
}
|
|
@@ -201,12 +189,8 @@ class Root extends StatefulEventBus {
|
|
|
201
189
|
* 当距底部还有 lowerThresholdCount 个 FlowItem 时的 scrollTop 值
|
|
202
190
|
*/
|
|
203
191
|
setLowerThresholdScrollTop() {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
// 必须用 sectionRange 实时计算,避免依赖可能未更新的 scrollHeight 状态
|
|
207
|
-
const range = this.sectionRange;
|
|
208
|
-
const totalHeight = range.length > 0 ? range[range.length - 1][1] : 0;
|
|
209
|
-
this.lowerThresholdScrollTop = totalHeight - this.getState().containerSize.height;
|
|
192
|
+
if (this.lowerThresholdCount === 0) {
|
|
193
|
+
this.lowerThresholdScrollTop = this.getState().scrollHeight - this.getState().containerSize.height;
|
|
210
194
|
return 0;
|
|
211
195
|
}
|
|
212
196
|
const sectionSize = this.sections.length;
|
|
@@ -254,18 +238,20 @@ class Root extends StatefulEventBus {
|
|
|
254
238
|
/**
|
|
255
239
|
* 处理滚动到阈值的情况
|
|
256
240
|
* 检测当前滚动位置是否达到了上下阈值,并触发相应的事件
|
|
257
|
-
* scrollElement 模式:scrollOffset 为内容内偏移(scrollTop - startOffset),upper/lowerThresholdScrollTop 基于本组件内容计算,触顶/触底以本 WaterFlow 内容为基准
|
|
258
241
|
*/
|
|
259
242
|
handleReachThreshold() {
|
|
260
|
-
const {
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
243
|
+
const { upperThresholdScrollTop } = this;
|
|
244
|
+
const { scrollOffset, scrollDirection, containerSize } = this.getState();
|
|
245
|
+
if (scrollDirection === 'backward' &&
|
|
246
|
+
this.upperThresholdScrollTop !== -Infinity &&
|
|
247
|
+
scrollOffset <= upperThresholdScrollTop) {
|
|
264
248
|
this.pub(RootEvents.ReachUpperThreshold);
|
|
265
|
-
|
|
249
|
+
}
|
|
250
|
+
if (scrollDirection === 'forward' &&
|
|
251
|
+
this.lowerThresholdCount !== Infinity &&
|
|
252
|
+
scrollOffset + containerSize.height >= this.lowerThresholdScrollTop) {
|
|
266
253
|
this.pub(RootEvents.ReachLowerThreshold);
|
|
267
|
-
|
|
268
|
-
this._inLowerZone = inLower;
|
|
254
|
+
}
|
|
269
255
|
}
|
|
270
256
|
/**
|
|
271
257
|
* 容器的滚动上边界
|
|
@@ -287,16 +273,13 @@ class Root extends StatefulEventBus {
|
|
|
287
273
|
* @returns [number,number][]
|
|
288
274
|
*/
|
|
289
275
|
get sectionRange() {
|
|
290
|
-
var _a;
|
|
291
276
|
const length = this.sections.length;
|
|
292
277
|
if (length === 0)
|
|
293
278
|
return [];
|
|
294
279
|
const range = Array.from({ length }, () => [0, this.sections[0].maxColumnHeight]);
|
|
295
280
|
for (let i = 1; i < length; i++) {
|
|
296
281
|
const previous = range[i - 1];
|
|
297
|
-
|
|
298
|
-
const gap = (_a = prevSection.rowGap) !== null && _a !== void 0 ? _a : 0;
|
|
299
|
-
range[i] = [previous[1] + gap, previous[1] + gap + this.sections[i].maxColumnHeight];
|
|
282
|
+
range[i] = [previous[1], previous[1] + this.sections[i].maxColumnHeight];
|
|
300
283
|
}
|
|
301
284
|
return range;
|
|
302
285
|
}
|