Skip to content

Commit 9927381

Browse files
committed
feat: 修改api
1 parent 26b66c9 commit 9927381

File tree

3 files changed

+41
-41
lines changed

3 files changed

+41
-41
lines changed

docs/en/api/virt-list.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
## Attributes
44

5-
| Attribute | Description | Type | Default | Required |
6-
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- | ----------------------------- |
7-
| list | list data | `Array` | - | <font color="#f00">Yes</font> |
8-
| itemKey | The Id of Item,<font color="#f00">unique key!!!</font>(if not, scroll fail) | `String\|Number` | - | <font color="#f00">Yes</font> |
9-
| minSize | **The Min Size of Item** | `Number` | `20` | <font color="#f00">Yes</font> |
10-
| itemGap | the gap between item (item size include itemGap) | `Number` | 0 | - |
11-
| fixed | fixed height of item use it | `Number` | `false` | - |
12-
| buffer | When the rendering amount is large and the scrolling white screen is serious, you can give a value<br/>bufferTop = bufferBottom = buffer | `Number` | `0` | - |
13-
| bufferTop | buffer of top | `Number` | `0` | - |
14-
| bufferBottom | buffer of bottom | `Number` | `0` | - |
15-
| horizontal | is horizontal scrolling | `Boolean` | `false` | - |
16-
| scrollDistance | Rolling threshold (triggering toTop or toBottom in advance) Unit: px | `number` | `0` | - |
17-
| fixSelection | fix the scrolling loss selection problem (only required and effective in vue2 diff-bug) | `Boolean` | `false` | - |
18-
| start | Start rendering index | `Number` | `0` | - |
19-
| offset | Start rendering scrollTop | `Number` | `0` | - |
20-
| listStyle | list container style | `String` | `''` | - |
21-
| listClass | list container class | `String` | `''` | - |
22-
| itemStyle | item style | `String` | `''` | - |
23-
| itemClass | item class | `String` | `''` | - |
24-
| renderControl | render control | `(begin: number, end: number ) => { begin: number; end: number };` | - | - |
5+
| Attribute | Description | Type | Default | Required |
6+
| -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------- | ----------------------------- |
7+
| list | list data | `Array` | - | <font color="#f00">Yes</font> |
8+
| itemKey | The Id of Item,<font color="#f00">unique key!!!</font>(if not, scroll fail) | `String\|Number` | - | <font color="#f00">Yes</font> |
9+
| minSize | **The Min Size of Item** | `Number` | `20` | <font color="#f00">Yes</font> |
10+
| itemGap | the gap between item (item size include itemGap) | `Number` | 0 | - |
11+
| fixed | fixed height of item use it | `Number` | `false` | - |
12+
| buffer | When the rendering amount is large and the scrolling white screen is serious, you can give a value<br/>bufferTop = bufferBottom = buffer | `Number` | `0` | - |
13+
| bufferTop | buffer of top | `Number` | `0` | - |
14+
| bufferBottom | buffer of bottom | `Number` | `0` | - |
15+
| horizontal | is horizontal scrolling | `Boolean` | `false` | - |
16+
| scrollDistance | Rolling threshold (triggering toTop or toBottom in advance) Unit: px | `number` | `0` | - |
17+
| fixSelection | fix the scrolling loss selection problem (only required and effective in vue2 diff-bug) | `Boolean` | `false` | - |
18+
| start | Start rendering index | `Number` | `0` | - |
19+
| offset | Start rendering scrollTop | `Number` | `0` | - |
20+
| listStyle | list container style | string \| Array\<string \| { [key: string]: any }\> \| { [key: string]: any } | `''` | - |
21+
| listClass | list container class | string \| Array\<string\> \| { [key: string]: boolean } | `''` | - |
22+
| itemStyle | item style | string \| Array\<string \| { [key: string]: any }\> \| { [key: string]: any } | `''` | - |
23+
| itemClass | item class | string \|Array\<string\> \|{ [key: string]: boolean } | `''` | - |
24+
| renderControl | render control | `(begin: number, end: number ) => { begin: number; end: number };` | - | - |
2525

2626
## Slots
2727

docs/zh/api/virt-list.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
## 属性
44

5-
| 参数 | 说明 | 类型 | 默认值 | 是否必须 |
6-
| -------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- | ---------------------------- |
7-
| list | 数据 | `Array` | - | <font color="#f00">是</font> |
8-
| itemKey | 项的 id,<font color="#f00">必须唯一!!!</font>(否则会无法正常滚动) | `String\|Number` | - | <font color="#f00">是</font> |
9-
| minSize | **最小尺寸**,会根据这个尺寸来计算可视区域内个数 | `Number` | `20` | <font color="#f00">是</font> |
10-
| itemGap | 元素之间的间距 (元素尺寸包含itemGap) | `Number` | 0 | - |
11-
| fixed | 是否为固定高度,可以提升性能<br />**注意:动态高度模式下,请勿使用** | `Number` | `false` | - |
12-
| buffer | 当渲染量大,滚动白屏严重时,可以给定数值,bufferTop 和 bufferBottom 会等于 buffer | `Number` | `0` | - |
13-
| bufferTop | 顶部 buffer 个数 | `Number` | `0` | - |
14-
| bufferBottom | 底部 buffer 个数 | `Number` | `0` | - |
15-
| horizontal | 是否水平滚动 | `Boolean` | `false` | - |
16-
| scrollDistance | 滚动阈值(提前触发toTop或toBottom)单位:px | `number` | `0` | - |
17-
| fixSelection | 是否需要修复滚动丢失selection问题(仅vue2下需要和生效) | `Boolean` | `false` | - |
18-
| start | 起始渲染下标 | `Number` | `0` | - |
19-
| offset | 起始渲染顶部高度 | `Number` | `0` | - |
20-
| listStyle | 列表容器样式 | `String` | `''` | - |
21-
| listClass | 列表容器类名 | `String` | `''` | - |
22-
| itemStyle | item容器样式 | `String` | `''` | - |
23-
| itemClass | item容器类名 | `String` | `''` | - |
24-
| renderControl | 渲染控制器 | `(begin: number, end: number ) => { begin: number; end: number };` | - | - |
5+
| 参数 | 说明 | 类型 | 默认值 | 是否必须 |
6+
| -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------- | ---------------------------- |
7+
| list | 数据 | `Array` | - | <font color="#f00">是</font> |
8+
| itemKey | 项的 id,<font color="#f00">必须唯一!!!</font>(否则会无法正常滚动) | `String\|Number` | - | <font color="#f00">是</font> |
9+
| minSize | **最小尺寸**,会根据这个尺寸来计算可视区域内个数 | `Number` | `20` | <font color="#f00">是</font> |
10+
| itemGap | 元素之间的间距 (元素尺寸包含itemGap) | `Number` | 0 | - |
11+
| fixed | 是否为固定高度,可以提升性能<br />**注意:动态高度模式下,请勿使用** | `Number` | `false` | - |
12+
| buffer | 当渲染量大,滚动白屏严重时,可以给定数值,bufferTop 和 bufferBottom 会等于 buffer | `Number` | `0` | - |
13+
| bufferTop | 顶部 buffer 个数 | `Number` | `0` | - |
14+
| bufferBottom | 底部 buffer 个数 | `Number` | `0` | - |
15+
| horizontal | 是否水平滚动 | `Boolean` | `false` | - |
16+
| scrollDistance | 滚动阈值(提前触发toTop或toBottom)单位:px | `number` | `0` | - |
17+
| fixSelection | 是否需要修复滚动丢失selection问题(仅vue2下需要和生效) | `Boolean` | `false` | - |
18+
| start | 起始渲染下标 | `Number` | `0` | - |
19+
| offset | 起始渲染顶部高度 | `Number` | `0` | - |
20+
| listStyle | 列表容器样式 | string \| Array\<string \| { [key: string]: any }\> \| { [key: string]: any } | `''` | - |
21+
| listClass | 列表容器类名 | string \| Array\<string\> \| { [key: string]: boolean } | `''` | - |
22+
| itemStyle | item容器样式 | string \| Array\<string \| { [key: string]: any }\> \| { [key: string]: any } | `''` | - |
23+
| itemClass | item容器类名 | string \|Array\<string\> \|{ [key: string]: boolean } | `''` | - |
24+
| renderControl | 渲染控制器 | `(begin: number, end: number ) => { begin: number; end: number };` | - | - |
2525

2626
## 插槽
2727

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-virt-list",
3-
"version": "1.5.8",
3+
"version": "1.5.9",
44
"description": "Tiny & Virtual scroll list & Huge amount data & High performance (support vue2.x&vue3.x)",
55
"author": "kolarorz",
66
"license": "MIT",

0 commit comments

Comments
 (0)