docs: update component registration guide

This commit is contained in:
chenjiahan
2020-08-20 23:32:07 +08:00
parent 9a86e9e6ca
commit d42b1b43c3
124 changed files with 450 additions and 303 deletions
+7 -5
View File
@@ -3,11 +3,12 @@
### Install
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Swipe, SwipeItem } from 'vant';
Vue.use(Swipe);
Vue.use(SwipeItem);
const app = createApp();
app.use(Swipe);
app.use(SwipeItem);
```
## Usage
@@ -48,10 +49,11 @@ Use [Lazyload](#/en-US/lazyload) component to lazyload image.
```
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Lazyload } from 'vant';
Vue.use(Lazyload);
const app = createApp();
app.use(Lazyload);
export default {
data() {
+7 -5
View File
@@ -3,11 +3,12 @@
### 引入
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Swipe, SwipeItem } from 'vant';
Vue.use(Swipe);
Vue.use(SwipeItem);
const app = createApp();
app.use(Swipe);
app.use(SwipeItem);
```
## 代码演示
@@ -48,10 +49,11 @@ Vue.use(SwipeItem);
```
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Lazyload } from 'vant';
Vue.use(Lazyload);
const app = createApp();
app.use(Lazyload);
export default {
data() {