Skip to content

Commit 454016c

Browse files
committed
Update grid structure.
1 parent 0aa26fe commit 454016c

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,24 @@ npm install vue-virtual-scroll-list --save
133133

134134
<img height="256" src="https://tangbc.github.io/github-images/vitual-scroll-list-prop-type.png">
135135

136-
*Prop* | *Type* | *Required* | *Description* |
137-
:--- | :--- | :--- | :--- |
138-
| size | Number || Each list item height, in variable height, this prop just use to calculate the virtual-list outside container viewport fixed height. |
139-
| remain | Number || How many items should be shown in virtual-list viewport, so `size` and `remain` determine the outside container viewport height (`size × remian`). |
140-
| bench | Number | * | Default value is equal to `remain`, unreached items count, not show in virtual-list viewport but exist in real DOM, the larger the bench, the higher the scroll performance will achieved. |
141-
| start | Number | * | Default value is `0`, the initial scroll start index. It must be integer and in the range of list index, if invalid there will be effected as `0` or the last one. |
142-
| offset | Number | * | Default value is `0`, the initial scroll offset. If both `start` and `offset` are assigned at initialization, `start` is preferred. |
143-
| debounce | Number | * | It's disabled by default, milliseconds of using `debounce` function to ensure scroll event doesn't fire so often that it bricks browser performance. |
144-
| rtag | String | * | Default value is `div`, the virtual-list root element tag name, in all cases it's style is set to `display: block;` |
145-
| wtag | String | * | Default value is `div`, the virtual-list item wrapper element tag name, in all cases it's style is set to `display: block;` |
146-
| wclass | String | * | Default value is an empty string, the virtual-list item wrapper element class, if assign this prop, you better **not** to change it's [CSS box model](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model). |
147-
| totop | Function | * | Called when virtual-list is scrolled to top, no param. |
148-
| tobottom | Function | * | Called when virtual-list is scrolled to bottom, no param. |
149-
| onscroll | Function | * | Called when virtual-list is scrolling, with param: [`(event, data)`](https://github.com/tangbc/vue-virtual-scroll-list/releases/tag/v1.1.7). |
150-
| variable | Function or Boolean | * | Used in variable height, if assign `Function`, this prop is a variable height getter function which is called with param: `(index)` when each item is ready to be calculated; if assign `Boolean`, virtual-list will get each item variable height by it's inline style height automatic. |
151-
| item | Component | * | Used in `item-mode`, list item vue component. |
152-
| itemcount | Number | * | Used in `item-mode`, list data total counts. |
153-
| itemprops | Function | * | Used in `item-mode`, a function call when each item is going to be rendered. |
136+
| Prop | Type | Required | Description |
137+
|-----------|---------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
138+
| size | Number | | Each list item height, in variable height, this prop just use to calculate the virtual-list outside container viewport fixed height. |
139+
| remain | Number | | How many items should be shown in virtual-list viewport, so `size` and `remain` determine the outside container viewport height (`size × remian`). |
140+
| bench | Number | * | Default value is equal to `remain`, unreached items count, not show in virtual-list viewport but exist in real DOM, the larger the bench, the higher the scroll performance will achieved. |
141+
| start | Number | * | Default value is `0`, the initial scroll start index. It must be integer and in the range of list index, if invalid there will be effected as `0` or the last one. |
142+
| offset | Number | * | Default value is `0`, the initial scroll offset. If both `start` and `offset` are assigned at initialization, `start` is preferred. |
143+
| debounce | Number | * | It's disabled by default, milliseconds of using `debounce` function to ensure scroll event doesn't fire so often that it bricks browser performance. |
144+
| rtag | String | * | Default value is `div`, the virtual-list root element tag name, in all cases it's style is set to `display: block;` |
145+
| wtag | String | * | Default value is `div`, the virtual-list item wrapper element tag name, in all cases it's style is set to `display: block;` |
146+
| wclass | String | * | Default is no classname, the virtual-list item wrapper element class, if assign this prop, you better **not** to change it's [CSS box model](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model). |
147+
| totop | Function | * | Called when virtual-list is scrolled to top, no param. |
148+
| tobottom | Function | * | Called when virtual-list is scrolled to bottom, no param. |
149+
| onscroll | Function | * | Called when virtual-list is scrolling, with param: [`(event, data)`](https://github.com/tangbc/vue-virtual-scroll-list/releases/tag/v1.1.7). |
150+
| variable | Function or Boolean | * | Used in variable height, if assign `Function`, this prop is a variable height getter function which is called with param: `(index)` when each item is ready to be calculated; if assign `Boolean`, virtual-list will get each item variable height by it's inline style height automatic. |
151+
| item | Component | * | Using in `item-mode`, list item vue component. |
152+
| itemcount | Number | * | Using in `item-mode`, list data total counts. |
153+
| itemprops | Function | * | Using in `item-mode`, a function call when each item is going to be rendered. |
154154

155155

156156
## Public methods

0 commit comments

Comments
 (0)