docs: prettier all markdown files

This commit is contained in:
chenjiahan
2020-04-11 09:09:00 +08:00
committed by neverland
parent 48067f79db
commit 7f84f8a487
140 changed files with 4441 additions and 4723 deletions
+32 -32
View File
@@ -34,7 +34,7 @@ export default {
return {
list: [],
loading: false,
finished: false
finished: false,
};
},
methods: {
@@ -49,9 +49,9 @@ export default {
this.finished = true;
}
}, 1000);
}
}
}
},
},
};
```
### Error Info
@@ -73,17 +73,17 @@ export default {
return {
list: [],
error: false,
loading: false
loading: false,
};
},
methods: {
onLoad() {
fetchSomeThing().catch(() => {
this.error = true;
})
}
}
}
});
},
},
};
```
### PullRefresh
@@ -108,7 +108,7 @@ export default {
list: [],
loading: false,
finished: false,
refreshing: false
refreshing: false,
};
},
methods: {
@@ -133,9 +133,9 @@ export default {
this.finished = false;
this.loading = true;
this.onLoad();
}
}
}
},
},
};
```
## API
@@ -143,36 +143,36 @@ export default {
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | 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` |
| loading-text | Loading text | *string* | `Loading...` |
| finished-text | Finished text | *string* | - |
| error-text | Error loaded text | *string* | - |
| immediate-check | Whether to check loading position immediately after mounted | *boolean* | `true` |
| direction | Scroll directioncan be set to `up` | *string* | `down` |
| --- | --- | --- | --- |
| v-model | 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` |
| loading-text | Loading text | _string_ | `Loading...` |
| finished-text | Finished text | _string_ | - |
| error-text | Error loaded text | _string_ | - |
| immediate-check | Whether to check loading position immediately after mounted | _boolean_ | `true` |
| direction | Scroll directioncan be set to `up` | _string_ | `down` |
### Events
| Event | Description | Arguments |
|------|------|------|
| --- | --- | --- |
| load | Triggered when the distance between the scrollbar and the bottom is less than offset | - |
### Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get List instance and call instance methods
| Name | Description | Attribute | Return value |
|------|------|------|------|
| check | Check scroll position | - | - |
| Name | Description | Attribute | Return value |
| ----- | --------------------- | --------- | ------------ |
| check | Check scroll position | - | - |
### Slots
| Name | Description |
|------|------|
| default | List content |
| loading | Custom loading tips |
| Name | Description |
| -------- | -------------------- |
| default | List content |
| loading | Custom loading tips |
| finished | Custom finished tips |
| error | Custom error tips |
| error | Custom error tips |