Skip to content

Commit

Permalink
doc(dialog): update api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyan0205 committed Jan 15, 2021
1 parent 763b146 commit 08c32de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion components/dialog/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ this.$dialog.alert({ content: '' }) // Totally Import
| append-to | portal node of dialog | HTMLElement | `document.body` | - |
| has-mask | has mask or not | Boolean | `true` | - |
| mask-closable | if the dialog will be closed when clicking mask| Boolean | `false` | - |
| transition | the animation effect of dialog | String | refer to [Transition](https://didi.github.io/mand-mobile/#/en-US/docs/components/feedback/transition?anchor=API) for optional values |
| transition <sup class="version-after">2.5.14+</sup>| the animation effect of dialog | String | `md-fade`| refer to [Transition](https://didi.github.io/mand-mobile/#/en-US/docs/components/feedback/transition?anchor=API) for optional values |

#### DialogBtnOptions Props

Expand Down Expand Up @@ -87,6 +87,7 @@ Dynamically create a confirmation dialog
| confirmText | confirmation button | String | `Confirm` |
| cancelWarning | clicking the Cancel button is a warning action | Boolean | `false` |
| confirmWarning | clicking the Confirm button is a warning action | Boolean | `false` |
| transition <sup class="version-after">2.5.14+</sup>| the animation effect of dialog | String | `md-bounce` |
| onConfirm | callback function is invoked when clicking confirmation button | Function | -|
| onCancel | callback function is invoked when clicking cancellation button | Function | -|
| onShow <sup class="version-after">2.5.0+</sup>| callback function is invoked when dialog is shown | Function | -|
Expand All @@ -102,6 +103,7 @@ Dynamically create an alert dialog
| content | content of dialog | String | -|
| confirmText | confirmation button | String | `Confirm` |
| warning | clicking the Confirm button is a warning action | Boolean | `false` |
| transition <sup class="version-after">2.5.14+</sup>| the animation effect of dialog | String | `md-bounce` |
| onConfirm | callback function is invoked when clicking confirmation button | Function | -|
| onShow | callback function is invoked when dialog is shown | Function | -|
| onHide | callback function is invoked when dialog is hidden | Function | -|
Expand All @@ -114,6 +116,7 @@ Dynamically create a success dialog
| title | title of dialog | String | - |
| content | content of dialog | String | -|
| confirmText | confirmation button | String | `Confirm` |
| transition <sup class="version-after">2.5.14+</sup>| the animation effect of dialog | String | `md-bounce` |
| onConfirm | callback function is invoked when clicking confirmation button| Function | -|
| onCancel | callback function is invoked when clicking cancellation button | Function | -|
| onShow | callback function is invoked when dialog is shown | Function | -|
Expand All @@ -127,6 +130,7 @@ Dynamically create a fail dialog
| title | title of dialog | String | - |
| content | content of dialog | String | -|
| confirmText | confirmation button | String | `Confirm` |
| transition <sup class="version-after">2.5.14+</sup>| the animation effect of dialog | String | `md-bounce` |
| onConfirm | callback function is invoked when clicking confirmation button| Function | -|
| onCancel | callback function is invoked when clicking cancellation button | Function | -|
| onShow | callback function is invoked when dialog is shown | Function | -|
Expand Down
6 changes: 5 additions & 1 deletion components/dialog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ this.$dialog.alert({ content: '' }) // 全量引入
| append-to | 组件的挂载节点 | HTMLElement | `document.body`|-|
| has-mask | 是否有蒙层 | Boolean | `true`|-|
| mask-closable | 点击蒙层是否可关闭弹出层 | Boolean | `false`|-|
| transition | 弹出层过度动画 | String | 可选值参考[Transition](https://didi.github.io/mand-mobile/#/zh-CN/docs/components/feedback/transition?anchor=API) |
| transition <sup class="version-after">2.5.14+</sup> | 弹出层过度动画 | String |`md-fade`| 可选值参考[Transition](https://didi.github.io/mand-mobile/#/zh-CN/docs/components/feedback/transition?anchor=API) |

#### DialogBtnOptions Props

Expand Down Expand Up @@ -86,6 +86,7 @@ this.$dialog.alert({ content: '' }) // 全量引入
| confirmText | 底部确认按钮文字 | String | `确认`|
| cancelWarning | 点击取消按钮为警示操作 | Boolean | `false` |
| confirmWarning | 点击确认按钮为警示操作 | Boolean | `false` |
| transition <sup class="version-after">2.5.14+</sup>| 弹出层过度动画 | String | `md-bounce` |
| onConfirm | 点击确认按钮回调函数 | Function | -|
| onCancel | 点击取消按钮回调函数 | Function | -|
| onShow <sup class="version-after">2.5.0+</sup>| 窗口显示后回调函数 | Function | -|
Expand All @@ -101,6 +102,7 @@ this.$dialog.alert({ content: '' }) // 全量引入
| content | 正文内容 | String | -|
| confirmText | 底部确认按钮文字 | String | `确认`|
| warning | 点击确认按钮为警示操作 | Boolean | `false` |
| transition <sup class="version-after">2.5.14+</sup>| 弹出层过度动画 | String | `md-bounce` |
| onConfirm | 点击确认按钮回调函数 | Function | -|
| onShow | 窗口显示后回调函数 | Function | -|
| onHide | 窗口隐藏后回调函数 | Function | -|
Expand All @@ -113,6 +115,7 @@ this.$dialog.alert({ content: '' }) // 全量引入
| title | 窗口标题 | String | -|
| content | 正文内容 | String | -|
| confirmText | 底部确认按钮文字 | String | `确认`|
| transition <sup class="version-after">2.5.14+</sup>| 弹出层过度动画 | String | `md-bounce` |
| onConfirm | 点击确认按钮回调函数 | Function | -|
| onCancel | 点击取消按钮回调函数 | Function | -|
| onShow | 窗口显示后回调函数 | Function | -|
Expand All @@ -126,6 +129,7 @@ this.$dialog.alert({ content: '' }) // 全量引入
| title | 窗口标题 | String | -|
| content | 正文内容 | String | -|
| confirmText | 底部确认按钮文字 | String | `确认`|
| transition <sup class="version-after">2.5.14+</sup>| 弹出层过度动画 | String | `md-bounce` |
| onConfirm | 点击确认按钮回调函数 | Function | -|
| onCancel | 点击取消按钮回调函数 | Function | -|
| onShow | 窗口显示后回调函数 | Function | -|
Expand Down

0 comments on commit 08c32de

Please sign in to comment.