feat: migrate List component

This commit is contained in:
chenjiahan
2020-07-26 13:18:25 +08:00
parent 7fda2659f5
commit 01c7409e6e
7 changed files with 43 additions and 35 deletions
+6 -6
View File
@@ -19,7 +19,7 @@ Vue.use(List);
```html
<van-list
v-model="loading"
v-model:loading="loading"
:finished="finished"
finished-text="Finished"
@load="onLoad"
@@ -58,8 +58,8 @@ export default {
```html
<van-list
v-model="loading"
:error.sync="error"
v-model:loading="loading"
v-model:error="error"
error-text="Request failed. Click to reload"
@load="onLoad"
>
@@ -89,9 +89,9 @@ export default {
### PullRefresh
```html
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-pull-refresh v-model:loading="refreshing" @refresh="onRefresh">
<van-list
v-model="loading"
v-model:loading="loading"
:finished="finished"
finished-text="Finished"
@load="onLoad"
@@ -144,7 +144,7 @@ export default {
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| v-model | Whether to show loading infothe `load` event will not be triggered when loading | _boolean_ | `false` |
| v-model:loading | Whether to show loading infothe `load` event will not be triggered when loading | _boolean_ | `false` |
| finished | Whether loading is finishedthe `load` event will not be triggered when finished | _boolean_ | `false` |
| error | Whether loading is errorthe `load` event will be triggered only when error text clicked, the `sync` modifier is needed | _boolean_ | `false` |
| offset | The load event will be triggered when the distance between the scrollbar and the bottom is less than offset | _number \| string_ | `300` |