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
+3 -2
View File
@@ -3,10 +3,11 @@
### Install
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Notify } from 'vant';
Vue.use(Notify);
const app = createApp();
app.use(Notify);
```
## Usage
+3 -2
View File
@@ -19,11 +19,12 @@ Notify('通知内容');
通过组件调用 Notify 时,可以通过下面的方式进行注册(从 2.8.5 版本开始支持):
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Notify } from 'vant';
// 全局注册
Vue.use(Notify);
const app = createApp();
app.use(Notify);
// 局部注册
export default {