diff --git a/src/lazyload/README.md b/src/lazyload/README.md index c0e29ec5b..cc777ef88 100644 --- a/src/lazyload/README.md +++ b/src/lazyload/README.md @@ -40,6 +40,13 @@ Use `v-lazy:background-image` to set background url, and declare the height of t ### Lazyload Component +```js +// set `lazyComponent` option +Vue.use(Lazyload, { + lazyComponent: true +}); +``` + ```html @@ -61,4 +68,4 @@ Use `v-lazy:background-image` to set background url, and declare the height of t | filter | The image's listener filter | *object* | - | - | | lazyComponent | Lazyload component | *boolean* | `false` | - | -See more:[ vue-lazyload ](https://github.com/hilongjw/vue-lazyload) +> See more:[ vue-lazyload ](https://github.com/hilongjw/vue-lazyload) diff --git a/src/lazyload/README.zh-CN.md b/src/lazyload/README.zh-CN.md index 2152f4fde..273a6b635 100644 --- a/src/lazyload/README.zh-CN.md +++ b/src/lazyload/README.zh-CN.md @@ -43,9 +43,16 @@ export default {
``` -### 懒加载模块 +### 组件懒加载 -懒加载模块需要使用到`lazy-component`,将需要懒加载的内容放在`lazy-component`中即可。 +将需要懒加载的组件放在`lazy-component`标签中,即可实现组件懒加载。 + +```js +// 注册时设置`lazyComponent`选项 +Vue.use(Lazyload, { + lazyComponent: true +}); +``` ```html @@ -68,4 +75,4 @@ export default { | filter | 图片 URL 过滤 | *object* | - | - | | lazyComponent | 是否能懒加载模块 | *boolean* | `false` | - | -更多内容请参照:[vue-lazyload 官方文档](https://github.com/hilongjw/vue-lazyload) +> 更多内容请参照:[vue-lazyload 官方文档](https://github.com/hilongjw/vue-lazyload)