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
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/bug_report.md
+5-12Lines changed: 5 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,18 @@ assignees: ''
7
7
8
8
---
9
9
10
-
**Describe**
11
-
10
+
## Describe
12
11
A clear and concise description of what the bug is.
13
12
14
-
15
-
**To Reproduce**
16
-
13
+
## To Reproduce
17
14
Steps to reproduce the behavior:
18
15
1. Click on '....'
19
16
2. Scroll down to '....'
20
17
3. See error
21
18
19
+
## Reproduce demo
20
+
Providing a reproduce demo of this bug, that will help me solve the problem more quickly. You can fork by this online demo: https://codesandbox.io/s/live-demo-virtual-list-e1ww1
22
21
23
-
**Live demo**
24
-
25
-
Providing a jsfiddle (or other) live demo can reproduce this bug, that will help me solve the problem more quickly.
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/feature_request.md
+2-7Lines changed: 2 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,6 @@ assignees: ''
7
7
8
8
---
9
9
10
-
**Is your feature request related to a problem?**
10
+
## Describe the feature request
11
11
12
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13
-
14
-
15
-
**Describe the feature request**
16
-
17
-
A clear and concise description of what you want to happen.
12
+
A clear and concise description of what you want to happen. Or a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|`size`| Number | Each item size, you don't have to know the accurate, just simply pass an **estimate** or **average** value. |
130
-
|`keeps`| Number | How many items you are expecting the list to keep rendering in the real dom. |
131
129
|`data-key`| String | The unique key get from `data-sources` in each data object, its value **must be unique** in `data-sources`, it is used for identifying item size. |
132
130
|`data-sources`| Array[Object]| The source array built for list, each array data must be an object and has an unique key for `data-key` property. |
133
131
|`data-component`| Component | The render item component created / declared by vue, and it will use the data object in `datas-sources` as render prop and named: `source`. |
@@ -139,34 +137,28 @@ More usages or getting start you can refer to these clearly [examples](https://g
<td>How many items you are expecting the virtual list to keep rendering in the real dom.</td>
150
+
</tr>
147
151
<tr>
148
152
<td><code>extra-props</code></td>
149
153
<td>Object</td>
150
154
<td>{}</td>
151
-
<td>Extra props pass to item component, notice: <code>index</code> and <code>source</code> are both occupied.</td>
155
+
<td>Extra props assign to item component that are not in <code>data-sources</code>. Notice: <code>index</code> and <code>source</code> are both occupied inner.</td>
152
156
</tr>
153
157
<tr>
154
-
<td><code>scroll</code></td>
155
-
<td>Event</td>
156
-
<td></td>
157
-
<td>Emited when scrolling, param <code>(event, range)</code>.</td>
158
-
</tr>
159
-
<tr>
160
-
<td><code>totop</code></td>
161
-
<td>Event</td>
162
-
<td></td>
163
-
<td>Emited when scrolled to top or left, no param.</td>
164
-
</tr>
165
-
<tr>
166
-
<td><code>tobottom</code></td>
167
-
<td>Event</td>
168
-
<td></td>
169
-
<td>Emited when scrolled to bottom or right, no param.</td>
158
+
<td><code>estimate-size</code></td>
159
+
<td>Number</td>
160
+
<td>50</td>
161
+
<td>The estimate size of each item, if it is closer to the average size, the scrollbar length looks more accurately. It is recommended to assign the average that calculate by yourself.</td>
170
162
</tr>
171
163
</table>
172
164
</details>
@@ -185,13 +177,31 @@ More usages or getting start you can refer to these clearly [examples](https://g
185
177
<td><code>start</code></td>
186
178
<td>Number</td>
187
179
<td>0</td>
188
-
<td>Setting scroll stay start index.</td>
180
+
<td>Setting scroll position stay start index.</td>
189
181
</tr>
190
182
<tr>
191
183
<td><code>offset</code></td>
192
184
<td>Number</td>
193
185
<td>0</td>
194
-
<td>Setting scroll stay offset.</td>
186
+
<td>Setting scroll position stay offset.</td>
187
+
</tr>
188
+
<tr>
189
+
<td><code>scroll</code></td>
190
+
<td>Event</td>
191
+
<td></td>
192
+
<td>Emited when scrolling, param <code>(event, range)</code>.</td>
193
+
</tr>
194
+
<tr>
195
+
<td><code>totop</code></td>
196
+
<td>Event</td>
197
+
<td></td>
198
+
<td>Emited when scrolled to top or left, no param.</td>
199
+
</tr>
200
+
<tr>
201
+
<td><code>tobottom</code></td>
202
+
<td>Event</td>
203
+
<td></td>
204
+
<td>Emited when scrolled to bottom or right, no param.</td>
195
205
</tr>
196
206
<tr>
197
207
<td><code>resized</code></td>
@@ -282,25 +292,53 @@ More usages or getting start you can refer to these clearly [examples](https://g
282
292
283
293
### Public methods
284
294
285
-
Here are some usefull public methods you can call via [`ref`](https://vuejs.org/v2/guide/components-edge-cases.html#Accessing-Child-Component-Instances-amp-Child-Elements):
286
-
287
-
*`reset()`: reset all state back to initial.
288
-
289
-
*`scrollToBottom()`: manual set scroll position to bottom.
290
-
291
-
*`scrollToIndex(index)`: manual set scroll position to a designated index.
292
-
293
-
*`scrollToOffset(offset)`: manual set scroll position to a designated offset.
294
-
295
-
*`getSize(id)`: get the designated item size by id (from data-key value).
296
-
297
-
*`getSizes()`: get the total number of stored (rendered) items.
298
-
299
-
*`getOffset()`: get current scroll offset.
300
-
301
-
*`getClientSize()`: get wrapper element client viewport size (width or height).
302
-
303
-
*`getScrollSize()`: get all scroll size (scrollHeight or scrollWidth).
295
+
<details>
296
+
<summary><strong>Usefull public methods</strong></summary>
297
+
<p></p>
298
+
<p>You can call these methods via <code><ahref="https://vuejs.org/v2/guide/components-edge-cases.html#Accessing-Child-Component-Instances-amp-Child-Elements">ref</a></code>:</p>
299
+
<table>
300
+
<tr>
301
+
<th>Method</th>
302
+
<th>Description</th>
303
+
</tr>
304
+
<tr>
305
+
<td><code>reset()</code></td>
306
+
<td>Reset all state back to initial.</td>
307
+
</tr>
308
+
<tr>
309
+
<td><code>scrollToBottom()</code></td>
310
+
<td>Manual set scroll position to bottom.</td>
311
+
</tr>
312
+
<tr>
313
+
<td><code>scrollToIndex(index)</code></td>
314
+
<td>Manual set scroll position to a designated index.</td>
315
+
</tr>
316
+
<tr>
317
+
<td><code>scrollToOffset(offset)</code></td>
318
+
<td>Manual set scroll position to a designated offset.</td>
319
+
</tr>
320
+
<tr>
321
+
<td><code>getSize(id)</code></td>
322
+
<td>Get the designated item size by id (from <code>data-key</code> value).</td>
323
+
</tr>
324
+
<tr>
325
+
<td><code>getSizes()</code></td>
326
+
<td>Get the total number of stored (rendered) items.</td>
327
+
</tr>
328
+
<tr>
329
+
<td><code>getOffset()</code></td>
330
+
<td>Get current scroll offset.</td>
331
+
</tr>
332
+
<tr>
333
+
<td><code>getClientSize()</code></td>
334
+
<td>Get wrapper element client viewport size (width or height).</td>
335
+
</tr>
336
+
<tr>
337
+
<td><code>getScrollSize()</code></td>
338
+
<td>Get all scroll size (scrollHeight or scrollWidth).</td>
0 commit comments