mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Dialog): fix v-model usage (#8115)
This commit is contained in:
parent
89b65077d3
commit
a23b3ddc60
@ -127,14 +127,14 @@ export default {
|
|||||||
|
|
||||||
| Name | Description | Attribute | Return value |
|
| Name | Description | Attribute | Return value |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Dialog | Show dialog | `options` | `Promise` |
|
| Dialog | Show dialog | _options: DialogOptions_ | `Promise<void>` |
|
||||||
| Dialog.alert | Show alert dialog | `options` | `Promise` |
|
| Dialog.alert | Show alert dialog | _options: DialogOptions_ | `Promise<void>` |
|
||||||
| Dialog.confirm | Show confim dialog | `options` | `Promise` |
|
| Dialog.confirm | Show confim dialog | _options: DialogOptions_ | `Promise<void>` |
|
||||||
| Dialog.setDefaultOptions | Set default options of all dialogs | `options` | `void` |
|
| Dialog.setDefaultOptions | Set default options of all dialogs | _options: DialogOptions_ | `void` |
|
||||||
| Dialog.resetDefaultOptions | Reset default options of all dialogs | - | `void` |
|
| Dialog.resetDefaultOptions | Reset default options of all dialogs | - | `void` |
|
||||||
| Dialog.close | Close dialog | - | `void` |
|
| Dialog.close | Close dialog | - | `void` |
|
||||||
|
|
||||||
### Options
|
### DialogOptions
|
||||||
|
|
||||||
| Attribute | Description | Type | Default |
|
| Attribute | Description | Type | Default |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
@ -142,7 +142,7 @@ export default {
|
|||||||
| width | Dialog width | _number \| string_ | `320px` |
|
| width | Dialog width | _number \| string_ | `320px` |
|
||||||
| message | Message | _string_ | - |
|
| message | Message | _string_ | - |
|
||||||
| messageAlign | Message text align,can be set to `left` `right` | _string_ | `center` |
|
| 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_ | - |
|
| className | Custom className | _string \| Array \| object_ | - |
|
||||||
| showConfirmButton | Whether to show confirm button | _boolean_ | `true` |
|
| showConfirmButton | Whether to show confirm button | _boolean_ | `true` |
|
||||||
| showCancelButton | Whether to show cancel button | _boolean_ | `false` |
|
| showCancelButton | Whether to show cancel button | _boolean_ | `false` |
|
||||||
@ -170,7 +170,7 @@ export default {
|
|||||||
| width | Width | _number \| string_ | `320px` |
|
| width | Width | _number \| string_ | `320px` |
|
||||||
| message | Message | _string_ | - |
|
| message | Message | _string_ | - |
|
||||||
| message-align | Message align,can be set to `left` `right` | _string_ | `center` |
|
| 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-confirm-button | Whether to show confirm button | _boolean_ | `true` |
|
||||||
| show-cancel-button | Whether to show cancel button | _boolean_ | `false` |
|
| show-cancel-button | Whether to show cancel button | _boolean_ | `false` |
|
||||||
| cancel-button-text | Cancel button text | _string_ | `Cancel` |
|
| cancel-button-text | Cancel button text | _string_ | `Cancel` |
|
||||||
|
@ -160,14 +160,14 @@ export default {
|
|||||||
|
|
||||||
| 方法名 | 说明 | 参数 | 返回值 |
|
| 方法名 | 说明 | 参数 | 返回值 |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Dialog | 展示弹窗 | `options` | `Promise` |
|
| Dialog | 展示弹窗 | _options: DialogOptions_ | `Promise<void>` |
|
||||||
| Dialog.alert | 展示消息提示弹窗 | `options` | `Promise` |
|
| Dialog.alert | 展示消息提示弹窗 | _options: DialogOptions_ | `Promise<void>` |
|
||||||
| Dialog.confirm | 展示消息确认弹窗 | `options` | `Promise` |
|
| Dialog.confirm | 展示消息确认弹窗 | _options: DialogOptions_ | `Promise<void>` |
|
||||||
| Dialog.setDefaultOptions | 修改默认配置,对所有 Dialog 生效 | `options` | `void` |
|
| Dialog.setDefaultOptions | 修改默认配置,对所有 Dialog 生效 | _options: DialogOptions_ | `void` |
|
||||||
| Dialog.resetDefaultOptions | 重置默认配置,对所有 Dialog 生效 | - | `void` |
|
| Dialog.resetDefaultOptions | 重置默认配置,对所有 Dialog 生效 | - | `void` |
|
||||||
| Dialog.close | 关闭弹窗 | - | `void` |
|
| Dialog.close | 关闭弹窗 | - | `void` |
|
||||||
|
|
||||||
### Options
|
### DialogOptions
|
||||||
|
|
||||||
通过函数调用 `Dialog` 时,支持传入以下选项:
|
通过函数调用 `Dialog` 时,支持传入以下选项:
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ export default {
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| v-model | 是否显示弹窗 | _boolean_ | - |
|
| v-model:show | 是否显示弹窗 | _boolean_ | - |
|
||||||
| title | 标题 | _string_ | - |
|
| title | 标题 | _string_ | - |
|
||||||
| width | 弹窗宽度,默认单位为 `px` | _number \| string_ | `320px` |
|
| width | 弹窗宽度,默认单位为 `px` | _number \| string_ | `320px` |
|
||||||
| message | 文本内容,支持通过 `\n` 换行 | _string_ | - |
|
| message | 文本内容,支持通过 `\n` 换行 | _string_ | - |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user