[Doc] Dialog: update usage (#1520)

This commit is contained in:
neverland 2018-07-21 10:09:17 +08:00 committed by GitHub
parent 4a12659b14
commit e5f252944a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,8 @@
```js
import { Dialog } from 'vant';
Vue.use(Dialog);
```
### Usage

View File

@ -5,6 +5,8 @@ Dialog 组件支持函数调用和组件调用两种形式
```js
import { Dialog } from 'vant';
Vue.use(Dialog);
```
### 代码演示
@ -83,7 +85,7 @@ export default {
#### 高级用法
如果需要在弹窗内实现更复杂的交互,可以通过组件形式来调用 Dialog
如果需要在弹窗内实现更复杂的交互,可以通过组件形式来调用 Dialog,调用前需要通过 Vue.use 注册组件
```html
<van-dialog
@ -106,8 +108,6 @@ export default {
```
```js
Vue.use(Dialog);
export default {
data() {
return {