mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-26 19:36:36 +08:00
[Doc] Lazyload register (#1344)
This commit is contained in:
parent
d43c8c8050
commit
8139eb5479
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
### 使用指南
|
### 使用指南
|
||||||
|
|
||||||
`Lazyload`是`Vue`指令,所以需要使用它必须将它注册到`Vue`的指令中。
|
`Lazyload` 是 `Vue` 指令,使用前需要对指令进行注册
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Lazyload } from 'vant';
|
import { Lazyload } from 'vant';
|
||||||
|
|
||||||
|
// options 为可选参数,无则不传
|
||||||
Vue.use(Lazyload, options);
|
Vue.use(Lazyload, options);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user