[Doc] new theme
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## Dialog
|
||||
# Dialog
|
||||
|
||||
### Install
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Dialog } from 'vant';
|
||||
Vue.use(Dialog);
|
||||
```
|
||||
|
||||
### Usage
|
||||
## Usage
|
||||
|
||||
#### Alert dialog
|
||||
### Alert dialog
|
||||
|
||||
Used to prompt for some messages, only including one confirm button
|
||||
|
||||
@@ -29,7 +29,7 @@ Dialog.alert({
|
||||
});
|
||||
```
|
||||
|
||||
#### Confirm dialog
|
||||
### Confirm dialog
|
||||
|
||||
Used to confirm some messages, including a confirm button and a cancel button
|
||||
|
||||
@@ -44,7 +44,7 @@ Used to confirm some messages, including a confirm button and a cancel button
|
||||
});
|
||||
```
|
||||
|
||||
#### Asnyc Close
|
||||
### Asnyc Close
|
||||
|
||||
```js
|
||||
function beforeClose(action, done) {
|
||||
@@ -62,7 +62,7 @@ Dialog.confirm({
|
||||
});
|
||||
```
|
||||
|
||||
#### $dialog Method
|
||||
### $dialog Method
|
||||
|
||||
After import the Dialog component, the $dialog method is automatically mounted on Vue.prototype, making it easy to call within a vue component.
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
#### Advanced Usage
|
||||
### Advanced Usage
|
||||
|
||||
If you need to render vue components within a dialog, you can use dialog component.
|
||||
|
||||
@@ -100,6 +100,8 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Methods
|
||||
|
||||
| Name | Attribute | Return value | Description |
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
## Dialog 弹出框
|
||||
Dialog 组件支持函数调用和组件调用两种形式
|
||||
# Dialog 弹出框
|
||||
|
||||
### 使用指南
|
||||
### 介绍
|
||||
|
||||
弹出框组件支持函数调用和组件调用两种形式
|
||||
|
||||
### 引入
|
||||
|
||||
```js
|
||||
import { Dialog } from 'vant';
|
||||
@@ -9,9 +12,9 @@ import { Dialog } from 'vant';
|
||||
Vue.use(Dialog);
|
||||
```
|
||||
|
||||
### 代码演示
|
||||
## 代码演示
|
||||
|
||||
#### 消息提示
|
||||
### 消息提示
|
||||
|
||||
用于提示一些消息,只包含一个确认按钮
|
||||
|
||||
@@ -30,7 +33,7 @@ Dialog.alert({
|
||||
});
|
||||
```
|
||||
|
||||
#### 消息确认
|
||||
### 消息确认
|
||||
|
||||
用于确认消息,包含取消和确认按钮
|
||||
|
||||
@@ -45,7 +48,7 @@ Dialog.confirm({
|
||||
});
|
||||
```
|
||||
|
||||
#### 异步关闭
|
||||
### 异步关闭
|
||||
|
||||
```js
|
||||
function beforeClose(action, done) {
|
||||
@@ -63,7 +66,7 @@ Dialog.confirm({
|
||||
});
|
||||
```
|
||||
|
||||
#### 全局方法
|
||||
### 全局方法
|
||||
|
||||
引入 Dialog 组件后,会自动在 Vue 的 prototype 上挂载 $dialog 方法,在所有组件内部都可以直接调用此方法
|
||||
|
||||
@@ -77,7 +80,7 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
#### 组件调用
|
||||
### 组件调用
|
||||
|
||||
如果需要在弹窗内嵌入组件或其他自定义内容,可以使用组件调用的方式,调用前需要通过 `Vue.use` 注册组件
|
||||
|
||||
@@ -101,6 +104,8 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### 方法
|
||||
|
||||
| 方法名 | 参数 | 返回值 | 介绍 |
|
||||
|
||||
Reference in New Issue
Block a user