docs(Swipe): improve document

This commit is contained in:
陈嘉涵
2020-01-20 19:43:38 +08:00
parent 803727e2f9
commit 57d88bd586
3 changed files with 40 additions and 6 deletions
+16 -1
View File
@@ -17,12 +17,22 @@ Vue.use(SwipeItem);
Use `autoplay` prop to set autoplay interval
```html
<van-swipe :autoplay="3000" indicator-color="white">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item>1</van-swipe-item>
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
</van-swipe>
<style>
.my-swipe .van-swipe-item {
color: #fff;
font-size: 20px;
line-height: 150px;
text-align: center;
background-color: #39a9ed;
}
</style>
```
### Image Lazyload
@@ -38,6 +48,11 @@ Use [Lazyload](#/en-US/lazyload) component to lazyload image
```
```js
import Vue from 'vue';
import { Lazyload } from 'vant';
Vue.use(Lazyload);
export default {
data() {
return {