docs(Dialog): update demo (#7007)
This commit is contained in:
+17
-17
@@ -56,6 +56,23 @@ Dialog.alert({
|
||||
});
|
||||
```
|
||||
|
||||
### 消息确认
|
||||
|
||||
用于确认消息,包含取消和确认按钮。
|
||||
|
||||
```js
|
||||
Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '弹窗内容',
|
||||
})
|
||||
.then(() => {
|
||||
// on confirm
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
```
|
||||
|
||||
### 圆角按钮风格
|
||||
|
||||
将 theme 选项设置为 `round-button` 可以展示圆角按钮风格的弹窗,该选项从 2.10.0 版本开始支持。
|
||||
@@ -77,23 +94,6 @@ Dialog.alert({
|
||||
});
|
||||
```
|
||||
|
||||
### 消息确认
|
||||
|
||||
用于确认消息,包含取消和确认按钮。
|
||||
|
||||
```js
|
||||
Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '弹窗内容',
|
||||
})
|
||||
.then(() => {
|
||||
// on confirm
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
```
|
||||
|
||||
### 异步关闭
|
||||
|
||||
通过 `beforeClose` 属性可以传入一个回调函数,在弹窗关闭前进行特定操作。
|
||||
|
||||
Reference in New Issue
Block a user