@tarojs/components-advanced 4.1.4 → 4.1.5-alpha.1

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.
@@ -1,3 +1,4 @@
1
+ export * from './list/index';
1
2
  export * from './virtual-list';
2
3
  export * from './virtual-waterfall';
3
4
  export * from './water-flow';
@@ -1,6 +1,10 @@
1
+ export { List, accumulate, isShaking } from './list/index.js';
1
2
  export { VirtualList } from './virtual-list/index.js';
2
3
  export { VirtualWaterfall } from './virtual-waterfall/index.js';
3
4
  import './water-flow/index.js';
5
+ export { default as ListItem } from './list/ListItem.js';
6
+ export { default as StickyHeader } from './list/StickyHeader.js';
7
+ export { default as StickySection } from './list/StickySection.js';
4
8
  export { FlowItem, useFlowItemPositioner } from './water-flow/flow-item.js';
5
9
  export { FlowSection } from './water-flow/flow-section.js';
6
10
  export { WaterFlow } from './water-flow/water-flow.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface ListItemProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ declare const ListItem: React.FC<ListItemProps>;
8
+ export default ListItem;
@@ -0,0 +1,9 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { View } from '@tarojs/components';
3
+
4
+ const ListItem = ({ children, className, style }) => {
5
+ return jsx(View, { className: className, style: style, children: children });
6
+ };
7
+
8
+ export { ListItem as default };
9
+ //# sourceMappingURL=ListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.js","sources":["../../../src/components/list/ListItem.tsx"],"sourcesContent":["import { View } from '@tarojs/components'\nimport React from 'react'\n\nexport interface ListItemProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nconst ListItem: React.FC<ListItemProps> = ({ children, className, style }) => {\n return <View className={className} style={style}>{children}</View>\n}\n\nexport default ListItem\n"],"names":["_jsx"],"mappings":";;;AASM,MAAA,QAAQ,GAA4B,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;AAC3E,IAAA,OAAOA,GAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAG,QAAA,EAAA,QAAQ,GAAQ;AACpE;;;;"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface StickyHeaderProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ declare const StickyHeader: React.FC<StickyHeaderProps>;
8
+ export default StickyHeader;
@@ -0,0 +1,9 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { View } from '@tarojs/components';
3
+
4
+ const StickyHeader = ({ children, className, style }) => {
5
+ return jsx(View, { className: className, style: style, children: children });
6
+ };
7
+
8
+ export { StickyHeader as default };
9
+ //# sourceMappingURL=StickyHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickyHeader.js","sources":["../../../src/components/list/StickyHeader.tsx"],"sourcesContent":["import { View } from '@tarojs/components'\nimport React from 'react'\n\nexport interface StickyHeaderProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nconst StickyHeader: React.FC<StickyHeaderProps> = ({ children, className, style }) => {\n return <View className={className} style={style}>{children}</View>\n}\n\nexport default StickyHeader\n"],"names":["_jsx"],"mappings":";;;AASM,MAAA,YAAY,GAAgC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;AACnF,IAAA,OAAOA,GAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAG,QAAA,EAAA,QAAQ,GAAQ;AACpE;;;;"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface StickySectionProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ declare const StickySection: React.FC<StickySectionProps>;
8
+ export default StickySection;
@@ -0,0 +1,9 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { View } from '@tarojs/components';
3
+
4
+ const StickySection = ({ children, className, style }) => {
5
+ return jsx(View, { className: className, style: style, children: children });
6
+ };
7
+
8
+ export { StickySection as default };
9
+ //# sourceMappingURL=StickySection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickySection.js","sources":["../../../src/components/list/StickySection.tsx"],"sourcesContent":["import { View } from '@tarojs/components'\nimport React from 'react'\n\nexport interface StickySectionProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nconst StickySection: React.FC<StickySectionProps> = ({ children, className, style }) => {\n return <View className={className} style={style}>{children}</View>\n}\n\nexport default StickySection\n"],"names":["_jsx"],"mappings":";;;AASM,MAAA,aAAa,GAAiC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;AACrF,IAAA,OAAOA,GAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAG,QAAA,EAAA,QAAQ,GAAQ;AACpE;;;;"}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import ListItem from './ListItem';
3
+ import StickyHeader from './StickyHeader';
4
+ import StickySection from './StickySection';
5
+ export interface ListProps {
6
+ showScrollbar?: boolean;
7
+ scrollTop?: number;
8
+ onScroll?: (e: {
9
+ scrollTop: number;
10
+ scrollLeft: number;
11
+ }) => void;
12
+ onScrollToUpper?: () => void;
13
+ onScrollToLower?: () => void;
14
+ upperThresholdCount?: number;
15
+ lowerThresholdCount?: number;
16
+ cacheCount?: number;
17
+ stickyHeader?: boolean;
18
+ space?: number;
19
+ item?: React.ComponentType<any>;
20
+ itemCount?: number;
21
+ itemData?: any[];
22
+ itemSize?: number | ((index: number, data?: any[]) => number);
23
+ height?: number | string;
24
+ width?: number | string;
25
+ layout?: 'vertical' | 'horizontal';
26
+ style?: React.CSSProperties;
27
+ children?: React.ReactNode;
28
+ headerHeight?: number;
29
+ headerWidth?: number;
30
+ itemHeight?: number;
31
+ itemWidth?: number;
32
+ }
33
+ export declare function accumulate(arr: number[]): number[];
34
+ export declare function isShaking(diffList: number[]): boolean;
35
+ declare const List: React.FC<ListProps>;
36
+ export { List, ListItem, StickyHeader, StickySection };
37
+ export default List;
@@ -0,0 +1,350 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { View, ScrollView } from '@tarojs/components';
3
+ import React from 'react';
4
+ import ListItem from './ListItem.js';
5
+ import StickyHeader from './StickyHeader.js';
6
+ import StickySection from './StickySection.js';
7
+
8
+ // 工具:累加数组
9
+ function accumulate(arr) {
10
+ const result = [0];
11
+ for (let i = 0; i < arr.length; i++) {
12
+ result[i + 1] = result[i] + arr[i];
13
+ }
14
+ return result;
15
+ }
16
+ // 检测抖动
17
+ function isShaking(diffList) {
18
+ if (diffList.length < 3)
19
+ return false;
20
+ // 检查是否有连续的正负交替
21
+ const signs = diffList.map(diff => Math.sign(diff));
22
+ let alternations = 0;
23
+ for (let i = 1; i < signs.length; i++) {
24
+ if (signs[i] !== 0 && signs[i] !== signs[i - 1]) {
25
+ alternations++;
26
+ }
27
+ }
28
+ // 如果交替次数过多,认为是抖动
29
+ return alternations >= 2;
30
+ }
31
+ const List = (props) => {
32
+ const isH5 = process.env.TARO_ENV === 'h5';
33
+ const { stickyHeader = false, space = 0, height = 400, width = '100%', showScrollbar = true, scrollTop: controlledScrollTop, onScroll, onScrollToUpper, onScrollToLower, upperThresholdCount = 0, lowerThresholdCount = 0, cacheCount = 2, style, children, layout = 'vertical' } = props;
34
+ const isHorizontal = layout === 'horizontal';
35
+ const DEFAULT_ITEM_WIDTH = 120;
36
+ const DEFAULT_ITEM_HEIGHT = 40;
37
+ // 滚动状态管理
38
+ const containerRef = React.useRef(null);
39
+ // 渲染偏移量 - 用于计算应该渲染哪些元素
40
+ const [renderOffset, setRenderOffset] = React.useState(controlledScrollTop !== null && controlledScrollTop !== void 0 ? controlledScrollTop : 0);
41
+ // 滚动视图偏移量 - 只在滚动结束或明确请求时更新到ScrollView
42
+ const [scrollViewOffset, setScrollViewOffset] = React.useState(controlledScrollTop !== null && controlledScrollTop !== void 0 ? controlledScrollTop : 0);
43
+ const [containerLength] = React.useState(typeof (isHorizontal ? width : height) === 'number' ? (isHorizontal ? width : height) : 400);
44
+ // 滚动追踪相关refs
45
+ const isScrollingRef = React.useRef(false);
46
+ const lastScrollTopRef = React.useRef(controlledScrollTop !== null && controlledScrollTop !== void 0 ? controlledScrollTop : 0);
47
+ const scrollDiffListRef = React.useRef([0, 0, 0]);
48
+ const scrollTimeoutRef = React.useRef(null);
49
+ // 解析分组结构,只支持 StickySection 和 ListItem 作为直接子组件
50
+ const sections = React.useMemo(() => {
51
+ const result = [];
52
+ const defaultItems = [];
53
+ React.Children.forEach(children, (child, idx) => {
54
+ if (React.isValidElement(child) && child.type === StickySection) {
55
+ // 分组模式
56
+ const sectionProps = child.props;
57
+ let header = null;
58
+ const items = [];
59
+ React.Children.forEach(sectionProps.children, (subChild) => {
60
+ if (React.isValidElement(subChild) && subChild.type === StickyHeader)
61
+ header = subChild;
62
+ else if (React.isValidElement(subChild) && subChild.type === ListItem)
63
+ items.push(subChild);
64
+ });
65
+ result.push({ header, items, key: child.key || String(idx) });
66
+ }
67
+ else if (React.isValidElement(child) && child.type === ListItem) {
68
+ // 普通 ListItem
69
+ defaultItems.push(child);
70
+ }
71
+ });
72
+ if (defaultItems.length > 0) {
73
+ result.push({ header: null, items: defaultItems, key: 'default' });
74
+ }
75
+ return result;
76
+ }, [children]);
77
+ // 工具:获取 header 尺寸,确保所有 header 相关逻辑一致
78
+ const getHeaderSize = () => {
79
+ if (isHorizontal) {
80
+ if (typeof props.headerWidth === 'number')
81
+ return props.headerWidth;
82
+ if (typeof props.itemWidth === 'number')
83
+ return props.itemWidth;
84
+ if (typeof props.itemSize === 'number')
85
+ return props.itemSize;
86
+ if (typeof props.itemSize === 'function')
87
+ return props.itemSize(0, props.itemData) || DEFAULT_ITEM_WIDTH;
88
+ return DEFAULT_ITEM_WIDTH;
89
+ }
90
+ else {
91
+ if (typeof props.headerHeight === 'number')
92
+ return props.headerHeight;
93
+ if (typeof props.itemHeight === 'number')
94
+ return props.itemHeight;
95
+ if (typeof props.itemSize === 'number')
96
+ return props.itemSize;
97
+ if (typeof props.itemSize === 'function')
98
+ return props.itemSize(0, props.itemData) || DEFAULT_ITEM_HEIGHT;
99
+ return DEFAULT_ITEM_HEIGHT;
100
+ }
101
+ };
102
+ // 工具:获取 item 尺寸,支持函数/props/默认值
103
+ const getItemSize = (index) => {
104
+ if (isHorizontal) {
105
+ if (typeof props.itemWidth === 'number')
106
+ return props.itemWidth;
107
+ if (typeof props.itemSize === 'number')
108
+ return props.itemSize;
109
+ if (typeof props.itemSize === 'function')
110
+ return props.itemSize(index, props.itemData) || DEFAULT_ITEM_WIDTH;
111
+ return DEFAULT_ITEM_WIDTH;
112
+ }
113
+ else {
114
+ if (typeof props.itemHeight === 'number')
115
+ return props.itemHeight;
116
+ if (typeof props.itemSize === 'number')
117
+ return props.itemSize;
118
+ if (typeof props.itemSize === 'function')
119
+ return props.itemSize(index, props.itemData) || DEFAULT_ITEM_HEIGHT;
120
+ return DEFAULT_ITEM_HEIGHT;
121
+ }
122
+ };
123
+ // 计算分组累积高度/宽度
124
+ const sectionOffsets = React.useMemo(() => {
125
+ const offsets = [0];
126
+ sections.forEach((section) => {
127
+ const headerSize = getHeaderSize();
128
+ const itemSizes = section.items.map((_, i) => getItemSize(i));
129
+ const groupSize = (section.header ? headerSize : 0) +
130
+ itemSizes.reduce((a, b) => a + b, 0) +
131
+ Math.max(0, section.items.length) * space;
132
+ offsets.push(offsets[offsets.length - 1] + groupSize);
133
+ });
134
+ return offsets;
135
+ }, [sections, space, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData]);
136
+ // 外层虚拟滚动:可见分组
137
+ const [startSection, endSection] = React.useMemo(() => {
138
+ let start = 0;
139
+ let end = sections.length - 1;
140
+ for (let i = 0; i < sections.length; i++) {
141
+ if (sectionOffsets[i + 1] > renderOffset) {
142
+ start = Math.max(0, i - cacheCount);
143
+ break;
144
+ }
145
+ }
146
+ for (let i = start; i < sections.length; i++) {
147
+ if (sectionOffsets[i] >= renderOffset + containerLength) {
148
+ end = Math.min(sections.length - 1, i + cacheCount);
149
+ break;
150
+ }
151
+ }
152
+ return [start, end];
153
+ }, [renderOffset, containerLength, sectionOffsets, sections.length, cacheCount]);
154
+ // 触顶/触底事件
155
+ React.useEffect(() => {
156
+ if (onScrollToUpper && renderOffset <= (upperThresholdCount > 0 ? sectionOffsets[upperThresholdCount] : 0)) {
157
+ onScrollToUpper();
158
+ }
159
+ if (onScrollToLower && renderOffset + containerLength >= sectionOffsets[sectionOffsets.length - 1] - (lowerThresholdCount > 0 ? sectionOffsets[sectionOffsets.length - 1] - sectionOffsets[sections.length - lowerThresholdCount] : 0)) {
160
+ onScrollToLower();
161
+ }
162
+ }, [renderOffset, containerLength, sectionOffsets, sections.length, upperThresholdCount, lowerThresholdCount, onScrollToUpper, onScrollToLower]);
163
+ // 处理渲染偏移量更新
164
+ const updateRenderOffset = React.useCallback((newOffset) => {
165
+ lastScrollTopRef.current = newOffset;
166
+ isScrollingRef.current = true;
167
+ if (scrollTimeoutRef.current) {
168
+ clearTimeout(scrollTimeoutRef.current);
169
+ }
170
+ setRenderOffset(newOffset); // 立即更新渲染偏移量
171
+ // 平台适配:微信小程序使用延时,其他平台立即更新
172
+ const isWeapp = process.env.TARO_ENV === 'weapp';
173
+ if (isWeapp) {
174
+ // 微信小程序:使用延时避免抖动
175
+ scrollTimeoutRef.current = setTimeout(() => {
176
+ isScrollingRef.current = false;
177
+ setScrollViewOffset(newOffset); // 滚动结束后,同步滚动视图偏移量
178
+ }, 200);
179
+ }
180
+ else {
181
+ // 其他平台:立即更新以获得更好的响应性
182
+ setScrollViewOffset(newOffset); // 立即更新滚动视图偏移量
183
+ scrollTimeoutRef.current = setTimeout(() => {
184
+ isScrollingRef.current = false;
185
+ }, 200);
186
+ }
187
+ }, []);
188
+ // 智能滚动处理函数
189
+ const handleScroll = React.useCallback((e) => {
190
+ // 兼容Stencil版本和React版本的事件结构
191
+ let newOffset;
192
+ if (e.detail) {
193
+ // React版本的事件结构
194
+ newOffset = isHorizontal ? e.detail.scrollLeft : e.detail.scrollTop;
195
+ }
196
+ else {
197
+ // Stencil版本的事件结构
198
+ newOffset = isHorizontal ? e.scrollLeft : e.scrollTop;
199
+ }
200
+ const diff = newOffset - lastScrollTopRef.current;
201
+ scrollDiffListRef.current.shift();
202
+ scrollDiffListRef.current.push(diff);
203
+ // 只保留抖动检测,移除方向检测
204
+ if (isScrollingRef.current && isShaking(scrollDiffListRef.current)) {
205
+ return;
206
+ }
207
+ updateRenderOffset(newOffset); // 直接更新渲染偏移量
208
+ onScroll === null || onScroll === void 0 ? void 0 : onScroll({
209
+ scrollTop: isHorizontal ? 0 : newOffset,
210
+ scrollLeft: isHorizontal ? newOffset : 0
211
+ });
212
+ }, [isHorizontal, onScroll, updateRenderOffset, containerLength]);
213
+ // 初始化后的延迟同步 - 确保ScrollView正确设置初始位置
214
+ React.useEffect(() => {
215
+ if (typeof controlledScrollTop === 'number') {
216
+ setScrollViewOffset(controlledScrollTop);
217
+ lastScrollTopRef.current = controlledScrollTop;
218
+ }
219
+ }, [controlledScrollTop]);
220
+ // 清理定时器
221
+ React.useEffect(() => {
222
+ return () => {
223
+ if (scrollTimeoutRef.current) {
224
+ clearTimeout(scrollTimeoutRef.current);
225
+ }
226
+ };
227
+ }, []);
228
+ // 容器样式
229
+ const containerStyle = Object.assign({ position: 'relative', boxSizing: 'border-box', height: isHorizontal ? width : height, width: isHorizontal ? height : width }, style);
230
+ // 修改ScrollView组件的props,添加data-testid属性
231
+ // ScrollView 属性
232
+ const scrollViewProps = {
233
+ scrollY: !isHorizontal,
234
+ scrollX: isHorizontal,
235
+ style: containerStyle,
236
+ enhanced: true,
237
+ showScrollbar: showScrollbar,
238
+ onScroll: handleScroll,
239
+ onScrollToUpper,
240
+ onScrollToLower,
241
+ 'data-testid': 'taro-list-container'
242
+ };
243
+ // 设置ScrollView的滚动位置 - 同时兼容React版本和Stencil版本
244
+ if (isHorizontal) {
245
+ scrollViewProps.scrollLeft = scrollViewOffset; // React版本
246
+ scrollViewProps.mpScrollLeft = scrollViewOffset; // Stencil版本
247
+ }
248
+ else {
249
+ scrollViewProps.scrollTop = scrollViewOffset; // React版本
250
+ scrollViewProps.mpScrollTop = scrollViewOffset; // Stencil版本
251
+ }
252
+ // H5上额外使用DOM直接操作确保滚动位置正确
253
+ if (isH5) {
254
+ React.useEffect(() => {
255
+ if (containerRef.current && typeof scrollViewOffset === 'number') {
256
+ if (isHorizontal) {
257
+ containerRef.current.scrollLeft = scrollViewOffset;
258
+ }
259
+ else {
260
+ containerRef.current.scrollTop = scrollViewOffset;
261
+ }
262
+ }
263
+ }, [scrollViewOffset, isHorizontal]);
264
+ }
265
+ // 总高度/宽度
266
+ const totalLength = sectionOffsets[sectionOffsets.length - 1];
267
+ // 吸顶/吸左 header
268
+ const stickyHeaderNode = React.useMemo(() => {
269
+ if (!stickyHeader)
270
+ return null;
271
+ for (let i = 0; i < sections.length; i++) {
272
+ if (sectionOffsets[i] <= renderOffset && renderOffset < sectionOffsets[i + 1]) {
273
+ const section = sections[i];
274
+ if (section.header) {
275
+ const headerSize = getHeaderSize();
276
+ // 内联样式替代className
277
+ const stickyHeaderStyle = Object.assign({ position: 'sticky', top: 0, left: 0, zIndex: 100, background: '#fff', boxSizing: 'border-box', minHeight: '20px', overflow: 'hidden', lineHeight: 1 }, (isHorizontal ? { width: headerSize } : { height: headerSize }));
278
+ return (jsx(View, { style: stickyHeaderStyle, children: section.header }));
279
+ }
280
+ }
281
+ }
282
+ return null;
283
+ }, [stickyHeader, renderOffset, sectionOffsets, sections, isHorizontal, props.headerHeight, props.headerWidth, props.itemHeight, props.itemWidth, props.itemSize, props.itemData]);
284
+ // 渲染分组+item双层虚拟滚动
285
+ const renderSections = () => {
286
+ const nodes = [];
287
+ let offset = sectionOffsets[startSection];
288
+ for (let s = startSection; s <= endSection; s++) {
289
+ const section = sections[s];
290
+ const headerSize = getHeaderSize();
291
+ const itemSizes = section.items.map((_, i) => getItemSize(i));
292
+ // header
293
+ if (section.header) {
294
+ // 内联样式替代className
295
+ const sectionHeaderStyle = Object.assign({ position: 'absolute', zIndex: 2, boxSizing: 'border-box', width: '100%', minHeight: '20px', overflow: 'hidden', lineHeight: 1 }, (isHorizontal
296
+ ? { top: 0, height: '100%', left: offset, width: headerSize }
297
+ : { top: offset, height: headerSize }));
298
+ nodes.push(React.createElement(View, {
299
+ key: section.key + '-header' + '-' + layout,
300
+ style: sectionHeaderStyle,
301
+ }, section.header));
302
+ offset += headerSize;
303
+ }
304
+ // item offsets
305
+ const itemOffsets = accumulate(itemSizes.map((size) => size + space));
306
+ // 内层虚拟滚动:可见item区间
307
+ let startItem = 0;
308
+ let endItem = section.items.length - 1;
309
+ for (let i = 0; i < section.items.length; i++) {
310
+ if (offset + itemOffsets[i + 1] > renderOffset) {
311
+ startItem = Math.max(0, i - cacheCount);
312
+ break;
313
+ }
314
+ }
315
+ for (let i = startItem; i < section.items.length; i++) {
316
+ if (offset + itemOffsets[i] >= renderOffset + containerLength) {
317
+ endItem = Math.min(section.items.length - 1, i + cacheCount);
318
+ break;
319
+ }
320
+ }
321
+ // 渲染可见item
322
+ for (let i = startItem; i <= endItem; i++) {
323
+ // 内联样式替代className
324
+ const sectionItemStyle = Object.assign({ position: 'absolute', zIndex: 1, boxSizing: 'border-box', width: '100%', minHeight: '20px', overflow: 'hidden', lineHeight: 1 }, (isHorizontal
325
+ ? {
326
+ top: 0,
327
+ height: '100%',
328
+ left: offset + itemOffsets[i],
329
+ width: itemSizes[i],
330
+ marginRight: space
331
+ }
332
+ : {
333
+ top: offset + itemOffsets[i],
334
+ height: itemSizes[i],
335
+ marginBottom: space
336
+ }));
337
+ nodes.push(React.createElement(View, {
338
+ key: section.key + '-item-' + i + '-' + layout,
339
+ style: sectionItemStyle,
340
+ }, section.items[i]));
341
+ }
342
+ offset += itemOffsets[itemOffsets.length - 1];
343
+ }
344
+ return nodes;
345
+ };
346
+ return (jsx(ScrollView, Object.assign({ ref: containerRef }, scrollViewProps, { children: jsxs(View, { style: isHorizontal ? { width: totalLength, position: 'relative', height: '100%' } : { height: totalLength, position: 'relative', width: '100%' }, children: [stickyHeaderNode, renderSections()] }) })));
347
+ };
348
+
349
+ export { List, ListItem, StickyHeader, StickySection, accumulate, List as default, isShaking };
350
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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 onScroll?: (e: { scrollTop: number, scrollLeft: number }) => void\n onScrollToUpper?: () => void\n onScrollToLower?: () => void\n upperThresholdCount?: number\n lowerThresholdCount?: number\n cacheCount?: number\n stickyHeader?: boolean\n space?: number\n item?: React.ComponentType<any>\n itemCount?: number\n itemData?: any[]\n itemSize?: number | ((index: number, data?: any[]) => number)\n height?: number | string\n width?: number | string\n layout?: 'vertical' | 'horizontal'\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 onScroll,\n onScrollToUpper,\n onScrollToLower,\n upperThresholdCount = 0,\n lowerThresholdCount = 0,\n cacheCount = 2,\n style,\n children,\n layout = 'vertical'\n } = props\n\n const isHorizontal = layout === 'horizontal'\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 <= (upperThresholdCount > 0 ? sectionOffsets[upperThresholdCount] : 0)) {\n onScrollToUpper()\n }\n if (onScrollToLower && renderOffset + containerLength >= sectionOffsets[sectionOffsets.length - 1] - (lowerThresholdCount > 0 ? sectionOffsets[sectionOffsets.length - 1] - sectionOffsets[sections.length - lowerThresholdCount] : 0)) {\n onScrollToLower()\n }\n }, [renderOffset, containerLength, sectionOffsets, sections.length, upperThresholdCount, lowerThresholdCount, 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: !isHorizontal,\n scrollX: isHorizontal,\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' + '-' + layout,\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 + '-' + layout,\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}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,CAAA;AAEjB;;;;"}
@@ -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: (NumberConstructor | StringConstructor)[];
5
+ type: (StringConstructor | NumberConstructor)[];
6
6
  required: true;
7
7
  };
8
8
  width: {
9
- type: (NumberConstructor | StringConstructor)[];
9
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
96
+ type: (StringConstructor | NumberConstructor)[];
97
97
  required: true;
98
98
  };
99
99
  width: {
100
- type: (NumberConstructor | StringConstructor)[];
100
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
184
+ type: (StringConstructor | NumberConstructor)[];
185
185
  required: true;
186
186
  };
187
187
  width: {
188
- type: (NumberConstructor | StringConstructor)[];
188
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
279
+ type: (StringConstructor | NumberConstructor)[];
280
280
  required: true;
281
281
  };
282
282
  width: {
283
- type: (NumberConstructor | StringConstructor)[];
283
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
397
+ type: (StringConstructor | NumberConstructor)[];
398
398
  required: true;
399
399
  };
400
400
  width: {
401
- type: (NumberConstructor | StringConstructor)[];
401
+ type: (StringConstructor | NumberConstructor)[];
402
402
  required: true;
403
403
  };
404
404
  item: {
@@ -480,9 +480,10 @@ declare const _default: import("vue").DefineComponent<{
480
480
  onScrollNative: FunctionConstructor;
481
481
  onItemsRendered: FunctionConstructor;
482
482
  }>>, {
483
- unlimitedSize: boolean;
484
- position: string;
485
483
  layout: string;
484
+ position: string;
485
+ direction: string;
486
+ unlimitedSize: boolean;
486
487
  initialScrollOffset: number;
487
488
  overscanCount: number;
488
489
  useIsScrolling: boolean;
@@ -490,7 +491,6 @@ declare const _default: import("vue").DefineComponent<{
490
491
  outerElementType: string;
491
492
  innerElementType: string;
492
493
  itemElementType: string;
493
- direction: string;
494
494
  queryPrefix: string;
495
495
  shouldResetStyleCacheOnItemSizeChange: boolean;
496
496
  }>;
@@ -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: (NumberConstructor | StringConstructor)[];
5
+ type: (StringConstructor | NumberConstructor)[];
6
6
  required: true;
7
7
  };
8
8
  width: {
9
- type: (NumberConstructor | StringConstructor)[];
9
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
90
+ type: (StringConstructor | NumberConstructor)[];
91
91
  required: true;
92
92
  };
93
93
  width: {
94
- type: (NumberConstructor | StringConstructor)[];
94
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
172
+ type: (StringConstructor | NumberConstructor)[];
173
173
  required: true;
174
174
  };
175
175
  width: {
176
- type: (NumberConstructor | StringConstructor)[];
176
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
261
+ type: (StringConstructor | NumberConstructor)[];
262
262
  required: true;
263
263
  };
264
264
  width: {
265
- type: (NumberConstructor | StringConstructor)[];
265
+ type: (StringConstructor | NumberConstructor)[];
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: (NumberConstructor | StringConstructor)[];
371
+ type: (StringConstructor | NumberConstructor)[];
372
372
  required: true;
373
373
  };
374
374
  width: {
375
- type: (NumberConstructor | StringConstructor)[];
375
+ type: (StringConstructor | NumberConstructor)[];
376
376
  required: true;
377
377
  };
378
378
  column: NumberConstructor;
@@ -448,8 +448,8 @@ declare const _default: import("vue").DefineComponent<{
448
448
  onScrollNative: FunctionConstructor;
449
449
  onItemsRendered: FunctionConstructor;
450
450
  }>>, {
451
- unlimitedSize: boolean;
452
451
  position: string;
452
+ unlimitedSize: boolean;
453
453
  initialScrollOffset: number;
454
454
  placeholderCount: number;
455
455
  useIsScrolling: boolean;
package/dist/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import './components/index.js';
2
2
  import './utils/index.js';
3
+ export { List, accumulate, isShaking } from './components/list/index.js';
4
+ export { default as ListItem } from './components/list/ListItem.js';
5
+ export { default as StickyHeader } from './components/list/StickyHeader.js';
6
+ export { default as StickySection } from './components/list/StickySection.js';
3
7
  export { VirtualList } from './components/virtual-list/index.js';
4
8
  export { VirtualWaterfall } from './components/virtual-waterfall/index.js';
5
9
  export { FlowItem, useFlowItemPositioner } from './components/water-flow/flow-item.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components-advanced",
3
- "version": "4.1.4",
3
+ "version": "4.1.5-alpha.1",
4
4
  "description": "",
5
5
  "author": "O2Team",
6
6
  "license": "MIT",
@@ -20,19 +20,19 @@
20
20
  "csstype": "^3.1.1",
21
21
  "memoize-one": "^6.0.0",
22
22
  "tslib": "^2.6.2",
23
- "@tarojs/components": "4.1.4"
23
+ "@tarojs/components": "4.1.5-alpha.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "vue": "3.2.47",
27
- "@tarojs/runtime": "4.1.4",
28
- "@tarojs/shared": "4.1.4",
29
- "@tarojs/taro": "4.1.4"
27
+ "@tarojs/runtime": "4.1.5-alpha.1",
28
+ "@tarojs/taro": "4.1.5-alpha.1",
29
+ "@tarojs/shared": "4.1.5-alpha.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=18",
33
- "@tarojs/shared": "~4.1.4",
34
- "@tarojs/runtime": "~4.1.4",
35
- "@tarojs/taro": "~4.1.4"
33
+ "@tarojs/runtime": "~4.1.5-alpha.1",
34
+ "@tarojs/taro": "~4.1.5-alpha.1",
35
+ "@tarojs/shared": "~4.1.5-alpha.1"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "react": {