You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `<Item>` component is included inside but defined outside the `<virtualList>` component. We see that `<virtualList>` does **not** rely on the `<Item>` component. So you can use virtual-list with any component freely.
80
+
The `<Item>` component is included inside but defined outside the `<virtualList>` component, we see that `<virtualList>` does **not** rely on the `<Item>` component, so you can use virtual-list with any component freely.
81
81
82
82
#### Using by script include:
83
83
@@ -120,15 +120,15 @@ new Vue({
120
120
:--- | :--- | :--- | :--- |
121
121
| size | Number | ✓ | Each list item height, in variable height mode, this prop just use to calculate the virtual-list viewport height. |
122
122
| remain | Number | ✓ | How many items should be shown in virtual-list viewport, so `size` and `remain` determine the outside container viewport height (size × remian). |
123
-
| 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. |
124
123
| start | Number | * | Default value is `0`, the initial scroll start index. It must be integer and in the range of list index, if out of range it will be turned to `0` or the last one. |
124
+
| 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. |
125
125
| 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. |
126
126
| rtag | String | * | Default value is `div`, the virtual-list root element tag name, in all cases it's style is set to `display: block;`|
127
127
| 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;`|
128
128
| wclass | String | * | Default value is an empty string, the virtual-list item wrapper element class, has the same API with [`v-bind:class`](https://vuejs.org/v2/guide/class-and-style.html)|
129
-
| onscroll | Function | * | Called when virtual-list scroll event handling, param: `(e, offset)`. |
130
129
| totop | Function | * | Called when virtual-list is scrolled to top, no param. |
131
130
| tobottom | Function | * | Called when virtual-list is scrolled to bottom, no param. |
131
+
| onscroll | Function | * | Called when virtual-list is scrolling, param: `(e, { offset, offsetAll, start, end })`. |
132
132
| variable | Function | * | For using virtual-list with variable height mode, this prop is a variable height getter function which is called with param: `(index)` when each item is ready to be calculated. |
133
133
134
134
### About variable height
@@ -138,7 +138,7 @@ In variable height mode, prop `size` is still required. All the index variable h
138
138
139
139
## Contributions
140
140
141
-
Welcome to improve vue-virtual-scroll-list by any pull request or issue.
141
+
Welcome to improve vue-virtual-scroll-list with any issue, pull request or code review.
0 commit comments