Gathering detailed insights and metrics for wang-rc-virtual-list
Gathering detailed insights and metrics for wang-rc-virtual-list
npm install wang-rc-virtual-list
Typescript
Module System
Node Version
NPM Version
62.8
Supply Chain
94.9
Quality
81.8
Maintenance
100
Vulnerability
99.3
License
TypeScript (93.64%)
Less (3.43%)
JavaScript (2.31%)
HTML (0.62%)
Total Downloads
1,964
Last Day
1
Last Week
10
Last Month
74
Last Year
1,190
4 Stars
24 Commits
1 Forks
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
2.3.2
Package Id
wang-rc-virtual-list@2.3.2
Unpacked Size
35.56 kB
Size
8.72 kB
File Count
19
NPM Version
8.19.4
Node Version
16.20.2
Publised On
17 Oct 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
150%
10
Compared to previous week
Last month
208.3%
74
Compared to previous month
Last year
53.7%
1,190
Compared to previous year
1
1
1import {VirtualList} from '.' 2{list2.length && ( 3 <VirtualList<ItemType> 4 list={list2} 5 height={400} 6 itemHeight={40} 7 scrollToBottom={scrollToBottom} 8 scrollToTop={scrollToTop2} 9 itemKey="id" 10 renderFooter={ 11 <div style={{ textAlign: "center" }}>loading...</div> 12 } 13 renderHeader={<div style={{ textAlign: "center" }}>header</div>} 14 renderItem={({ index }: ItemType) => ( 15 <div 16 style={{ 17 outline: "1px solid red", 18 outlineOffset: -2, 19 backgroundColor: "#fff", 20 height: 40, 21 }} 22 > 23 {index} 24 </div> 25 )} 26 /> 27}
1import {AutoSizeVirtualList} from '.' 2{list2.length && ( 3 <AutoSizeVirtualList<ItemType> 4 list={list2} 5 height={400} 6 itemHeight={40} 7 itemKey={"id"} 8 scrollToTop={scrollToTop2} 9 scrollToBottom={scrollToBottom} 10 renderFooter={ 11 <div style={{ textAlign: "center" }}>loading...</div> 12 } 13 renderHeader={ 14 <div style={{ textAlign: "center" }}>header</div> 15 } 16 renderItem={({ name, height }: ItemType) => ( 17 <div 18 style={{ 19 outline: "1px solid red", 20 outlineOffset: -2, 21 height: height, 22 backgroundColor: "#fff", 23 }} 24 > 25 {name} 26 </div> 27 )} 28 /> 29)}
1import {RevertAutoSizeVirtualList} from '.' 2{list2.length && ( 3 <RevertAutoSizeVirtualList<ItemType> 4 list={list2} 5 height={400} 6 itemHeight={40} 7 itemKey={'id'} 8 scrollToTop={scrollToTop2} 9 renderFooter={<div style={{ textAlign: 'center' }}>拼命加载中...</div>} 10 scrollToBottom={scrollToBottom} 11 renderItem={({ name, height }: ItemType) => ( 12 <div 13 style={{ 14 outline: '1px solid red', 15 outlineOffset: -2, 16 height: height, 17 backgroundColor: '#fff' 18 }} 19 > 20 {name} 21 </div> 22 )} 23 /> 24)}
Prop | Description | Type | Default |
---|---|---|---|
list | Data list | Array | - |
height | list height | number | 400 |
itemHeight | list item height | number | 40 |
minSize | show cnt | number | 20 |
itemKey | react keys | key in T | - |
scrollToTop | go to top | number | 0 |
scrollToBottom | scrolled to bottom | (e) => void | - |
renderFooter | render footer( not revert ) | ReactNode | - |
renderHeader | render header | ReactNode | - |
renderItem | render item | (item: T) => ReactNode | - |
可以把 git 代码拉取下来,运行 demo 查看更多配置
No vulnerabilities found.
No security vulnerabilities found.