docs: prettier all markdown files

This commit is contained in:
chenjiahan
2020-04-11 09:17:33 +08:00
committed by neverland
parent 48067f79db
commit 7f84f8a487
140 changed files with 4441 additions and 4723 deletions
+18 -18
View File
@@ -12,7 +12,7 @@ Vue.use(Lazyload);
// 注册时可以配置额外的选项
Vue.use(Lazyload, {
lazyComponent: true
lazyComponent: true,
});
```
@@ -23,7 +23,7 @@ Vue.use(Lazyload, {
`v-lazy`指令的值设置为你需要懒加载的图片
```html
<img v-for="img in imageList" v-lazy="img" >
<img v-for="img in imageList" v-lazy="img" />
```
```js
@@ -32,11 +32,11 @@ export default {
return {
imageList: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg'
]
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
};
}
}
},
};
```
### 背景图懒加载
@@ -54,13 +54,13 @@ export default {
```js
// 注册时设置`lazyComponent`选项
Vue.use(Lazyload, {
lazyComponent: true
lazyComponent: true,
});
```
```html
<lazy-component>
<img v-for="img in imageList" v-lazy="img" >
<img v-for="img in imageList" v-lazy="img" />
</lazy-component>
```
@@ -68,15 +68,15 @@ Vue.use(Lazyload, {
### Options
| 参数 | 说明 | 类型 | 默认值 |
|------|------|------|------|
| loading | 加载时的图片 | *string* | - |
| error | 错误时的图片 | *string* | - |
| preload | 预加载高度的比例 | *string* | - |
| attempt | 尝试次数 | *number* | `3` |
| listenEvents | 监听的事件 | *string[]* | `scroll`等 |
| adapter | 适配器 | *object* | - |
| filter | 图片 URL 过滤 | *object* | - |
| lazyComponent | 是否能懒加载模块 | *boolean* | `false` |
| 参数 | 说明 | 类型 | 默认值 |
| ------------- | ---------------- | ---------- | ---------- |
| loading | 加载时的图片 | _string_ | - |
| error | 错误时的图片 | _string_ | - |
| preload | 预加载高度的比例 | _string_ | - |
| attempt | 尝试次数 | _number_ | `3` |
| listenEvents | 监听的事件 | _string[]_ | `scroll`等 |
| adapter | 适配器 | _object_ | - |
| filter | 图片 URL 过滤 | _object_ | - |
| lazyComponent | 是否能懒加载模块 | _boolean_ | `false` |
> 更多内容请参照:[vue-lazyload 官方文档](https://github.com/hilongjw/vue-lazyload)