From a23b3ddc607fd0a21e1460815e622ef1c56ae070 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 9 Feb 2021 21:07:21 +0800 Subject: [PATCH] docs(Dialog): fix v-model usage (#8115) --- src/dialog/README.md | 14 +++++++------- src/dialog/README.zh-CN.md | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/dialog/README.md b/src/dialog/README.md index 777b02118..6c47995ce 100644 --- a/src/dialog/README.md +++ b/src/dialog/README.md @@ -127,14 +127,14 @@ export default { | Name | Description | Attribute | Return value | | --- | --- | --- | --- | -| Dialog | Show dialog | `options` | `Promise` | -| Dialog.alert | Show alert dialog | `options` | `Promise` | -| Dialog.confirm | Show confim dialog | `options` | `Promise` | -| Dialog.setDefaultOptions | Set default options of all dialogs | `options` | `void` | +| Dialog | Show dialog | _options: DialogOptions_ | `Promise` | +| Dialog.alert | Show alert dialog | _options: DialogOptions_ | `Promise` | +| Dialog.confirm | Show confim dialog | _options: DialogOptions_ | `Promise` | +| Dialog.setDefaultOptions | Set default options of all dialogs | _options: DialogOptions_ | `void` | | Dialog.resetDefaultOptions | Reset default options of all dialogs | - | `void` | | Dialog.close | Close dialog | - | `void` | -### Options +### DialogOptions | Attribute | Description | Type | Default | | --- | --- | --- | --- | @@ -142,7 +142,7 @@ export default { | width | Dialog width | _number \| string_ | `320px` | | message | Message | _string_ | - | | messageAlign | Message text align,can be set to `left` `right` | _string_ | `center` | -| theme | theme style,can be set to `round-button` | _string_ | `default` | +| theme | Theme style,can be set to `round-button` | _string_ | `default` | | className | Custom className | _string \| Array \| object_ | - | | showConfirmButton | Whether to show confirm button | _boolean_ | `true` | | showCancelButton | Whether to show cancel button | _boolean_ | `false` | @@ -170,7 +170,7 @@ export default { | width | Width | _number \| string_ | `320px` | | message | Message | _string_ | - | | message-align | Message align,can be set to `left` `right` | _string_ | `center` | -| theme | theme style,can be set to `round-button` | _string_ | `default` | +| theme | Theme style,can be set to `round-button` | _string_ | `default` | | show-confirm-button | Whether to show confirm button | _boolean_ | `true` | | show-cancel-button | Whether to show cancel button | _boolean_ | `false` | | cancel-button-text | Cancel button text | _string_ | `Cancel` | diff --git a/src/dialog/README.zh-CN.md b/src/dialog/README.zh-CN.md index 3f738e472..0c9012036 100644 --- a/src/dialog/README.zh-CN.md +++ b/src/dialog/README.zh-CN.md @@ -160,23 +160,23 @@ export default { | 方法名 | 说明 | 参数 | 返回值 | | --- | --- | --- | --- | -| Dialog | 展示弹窗 | `options` | `Promise` | -| Dialog.alert | 展示消息提示弹窗 | `options` | `Promise` | -| Dialog.confirm | 展示消息确认弹窗 | `options` | `Promise` | -| Dialog.setDefaultOptions | 修改默认配置,对所有 Dialog 生效 | `options` | `void` | +| Dialog | 展示弹窗 | _options: DialogOptions_ | `Promise` | +| Dialog.alert | 展示消息提示弹窗 | _options: DialogOptions_ | `Promise` | +| Dialog.confirm | 展示消息确认弹窗 | _options: DialogOptions_ | `Promise` | +| Dialog.setDefaultOptions | 修改默认配置,对所有 Dialog 生效 | _options: DialogOptions_ | `void` | | Dialog.resetDefaultOptions | 重置默认配置,对所有 Dialog 生效 | - | `void` | | Dialog.close | 关闭弹窗 | - | `void` | -### Options +### DialogOptions 通过函数调用 `Dialog` 时,支持传入以下选项: | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | title | 标题 | _string_ | - | -| width | 弹窗宽度,默认单位为`px` | _number \| string_ | `320px` | -| message | 文本内容,支持通过`\n`换行 | _string_ | - | -| messageAlign | 内容对齐方式,可选值为`left` `right` | _string_ | `center` | +| width | 弹窗宽度,默认单位为 `px` | _number \| string_ | `320px` | +| message | 文本内容,支持通过 `\n` 换行 | _string_ | - | +| messageAlign | 内容对齐方式,可选值为 `left` `right` | _string_ | `center` | | theme | 样式风格,可选值为 `round-button` | _string_ | `default` | | className | 自定义类名 | _string \| Array \| object_ | - | | showConfirmButton | 是否展示确认按钮 | _boolean_ | `true` | @@ -193,7 +193,7 @@ export default { | lockScroll | 是否锁定背景滚动 | _boolean_ | `true` | | allowHtml | 是否允许 message 内容中渲染 HTML | _boolean_ | `false` | | beforeClose | 关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise | _(action) => boolean \| Promise_ | - | -| transition | 动画类名,等价于 [transtion](https://v3.cn.vuejs.org/api/built-in-components.html#transition) 的`name`属性 | _string_ | - | +| transition | 动画类名,等价于 [transtion](https://v3.cn.vuejs.org/api/built-in-components.html#transition) 的 `name` 属性 | _string_ | - | | teleport | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| Element_ | `body` | ### Props @@ -202,7 +202,7 @@ export default { | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| v-model | 是否显示弹窗 | _boolean_ | - | +| v-model:show | 是否显示弹窗 | _boolean_ | - | | title | 标题 | _string_ | - | | width | 弹窗宽度,默认单位为 `px` | _number \| string_ | `320px` | | message | 文本内容,支持通过 `\n` 换行 | _string_ | - |