docs: type highlight (#4264)

This commit is contained in:
neverland
2019-08-27 22:09:21 +08:00
committed by GitHub
parent a79750d00c
commit ecbdc2bede
129 changed files with 1493 additions and 1484 deletions
+30 -30
View File
@@ -118,43 +118,43 @@ export default {
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| title | Title | `string` | - | - |
| message | Message | `string` | - | - |
| messageAlign | Message text aligncan be set to `left` `right` | `string` | `center` | - |
| className | Custom className | `any` | - | - |
| showConfirmButton | Whether to show confirm button | `boolean` | `true` | - |
| showCancelButton | Whether to show cancel button | `boolean` | `false` | - |
| cancelButtonText | Cancel button text | `string` | `Cancel` | - |
| cancelButtonColor | Cancel button color | `string` | `#000` | - |
| confirmButtonText | Confirm button text | `string` | `Confirm` | - |
| confirmButtonColor | Confirm button color | `string` | `#1989fa` | - |
| overlay | Whether to show overlay | `boolean` | `true` | - |
| closeOnPopstate | Whether to close when popstate | `boolean` | `false` | 2.0.5 |
| closeOnClickOverlay | Whether to close when click overlay | `boolean` | `false` | - |
| lockScroll | Whether to lock body scroll | `boolean` | `true` | - |
| title | Title | *string* | - | - |
| message | Message | *string* | - | - |
| messageAlign | Message text aligncan be set to `left` `right` | *string* | `center` | - |
| className | Custom className | *any* | - | - |
| showConfirmButton | Whether to show confirm button | *boolean* | `true` | - |
| showCancelButton | Whether to show cancel button | *boolean* | `false` | - |
| cancelButtonText | Cancel button text | *string* | `Cancel` | - |
| cancelButtonColor | Cancel button color | *string* | `#000` | - |
| confirmButtonText | Confirm button text | *string* | `Confirm` | - |
| confirmButtonColor | Confirm button color | *string* | `#1989fa` | - |
| overlay | Whether to show overlay | *boolean* | `true` | - |
| closeOnPopstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 |
| closeOnClickOverlay | Whether to close when click overlay | *boolean* | `false` | - |
| lockScroll | Whether to lock body scroll | *boolean* | `true` | - |
| beforeClose | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - | - |
| getContainer | Return the mount node for Dialog | `string | () => HTMLElement` | `body` | - |
| getContainer | Return the mount node for Dialog | *string \| () => HTMLElement* | `body` | - |
### Props
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| v-model | Whether to show dialog | `boolean` | - | - |
| title | Title | `string` | - | - |
| message | Message | `string` | - | - |
| message-align | Message aligncan be set to `left` `right` | `string` | `center` | - |
| 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` | - |
| cancel-button-color | Cancel button color | `string` | `#000` | - |
| confirm-button-text | Confirm button text | `string` | `Confirm` | - |
| confirm-button-color | Confirm button color | `string` | `#1989fa` | - |
| overlay | Whether to show overlay | `boolean` | `true` | - |
| close-on-popstate | Whether to close when popstate | `boolean` | `false` | 2.0.5 |
| close-on-click-overlay | Whether to close when click overlay | `boolean` | `false` | - |
| lock-scroll | Whether to lock background scroll | `boolean` | `true` | - |
| v-model | Whether to show dialog | *boolean* | - | - |
| title | Title | *string* | - | - |
| message | Message | *string* | - | - |
| message-align | Message aligncan be set to `left` `right` | *string* | `center` | - |
| 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` | - |
| cancel-button-color | Cancel button color | *string* | `#000` | - |
| confirm-button-text | Confirm button text | *string* | `Confirm` | - |
| confirm-button-color | Confirm button color | *string* | `#1989fa` | - |
| overlay | Whether to show overlay | *boolean* | `true` | - |
| close-on-popstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 |
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `false` | - |
| lock-scroll | Whether to lock background scroll | *boolean* | `true` | - |
| before-close | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - | - |
| get-container | Return the mount node for Dialog | `string | () => HTMLElement` | - | - |
| get-container | Return the mount node for Dialog | *string \| () => HTMLElement* | - | - |
### Events
+32 -32
View File
@@ -147,22 +147,22 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| title | 标题 | `string` | - | - |
| message | 文本内容,支持通过`\n`换行 | `string` | - | - |
| messageAlign | 内容对齐方式,可选值为`left` `right` | `string` | `center` | - |
| className | 自定义类名 | `any` | - | - |
| showConfirmButton | 是否展示确认按钮 | `boolean` | `true` | - |
| showCancelButton | 是否展示取消按钮 | `boolean` | `false` | - |
| cancelButtonText | 取消按钮文案 | `string` | `取消` | - |
| cancelButtonColor | 取消按钮颜色 | `string` | `#000` | - |
| confirmButtonText | 确认按钮文案 | `string` | `确认` | - |
| confirmButtonColor | 确认按钮颜色 | `string` | `#1989fa` | - |
| overlay | 是否展示遮罩层 | `boolean` | `true` | - |
| closeOnPopstate | 是否在页面回退时自动关闭 | `boolean` | `false` | 2.0.5 |
| closeOnClickOverlay | 点击遮罩层时是否关闭弹窗 | `boolean` | `false` | - |
| lockScroll | 是否锁定背景滚动 | `boolean` | `true` | - |
| beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | `(action, done) => void` | - | - |
| getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `string | () => HTMLElement` | `body` | - |
| title | 标题 | *string* | - | - |
| message | 文本内容,支持通过`\n`换行 | *string* | - | - |
| messageAlign | 内容对齐方式,可选值为`left` `right` | *string* | `center` | - |
| className | 自定义类名 | *any* | - | - |
| showConfirmButton | 是否展示确认按钮 | *boolean* | `true` | - |
| showCancelButton | 是否展示取消按钮 | *boolean* | `false` | - |
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
| confirmButtonText | 确认按钮文案 | *string* | `确认` | - |
| confirmButtonColor | 确认按钮颜色 | *string* | `#1989fa` | - |
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
| closeOnClickOverlay | 点击遮罩层时是否关闭弹窗 | *boolean* | `false` | - |
| lockScroll | 是否锁定背景滚动 | *boolean* | `true` | - |
| beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | *(action, done) => void* | - | - |
| getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | *string \| () => HTMLElement* | `body` | - |
### Props
@@ -170,22 +170,22 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| v-model | 是否显示弹窗 | `boolean` | - | - |
| title | 标题 | `string` | - | - |
| message | 内容 | `string` | - | - |
| message-align | 内容对齐方式,可选值为`left` `right` | `string` | `center` | - |
| show-confirm-button | 是否展示确认按钮 | `boolean` | `true` | - |
| show-cancel-button | 是否展示取消按钮 | `boolean` | `false` | - |
| cancel-button-text | 取消按钮文案 | `string` | `取消` | - |
| cancel-button-color | 取消按钮颜色 | `string` | `#000` | - |
| confirm-button-text | 确认按钮文案 | `string` | `确认` | - |
| confirm-button-color | 确认按钮颜色 | `string` | `#1989fa` | - |
| overlay | 是否展示遮罩层 | `boolean` | `true` | - |
| close-on-popstate | 是否在页面回退时自动关闭 | `boolean` | `false` | 2.0.5 |
| close-on-click-overlay | 是否在点击遮罩层后关闭 | `boolean` | `false` | - |
| lock-scroll | 是否锁定背景滚动 | `boolean` | `true` | - |
| before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | `(action, done) => void` | - | - |
| get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `string | () => HTMLElement` | - | - |
| v-model | 是否显示弹窗 | *boolean* | - | - |
| title | 标题 | *string* | - | - |
| message | 内容 | *string* | - | - |
| message-align | 内容对齐方式,可选值为`left` `right` | *string* | `center` | - |
| show-confirm-button | 是否展示确认按钮 | *boolean* | `true` | - |
| show-cancel-button | 是否展示取消按钮 | *boolean* | `false` | - |
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
| confirm-button-text | 确认按钮文案 | *string* | `确认` | - |
| confirm-button-color | 确认按钮颜色 | *string* | `#1989fa` | - |
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
| close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
| close-on-click-overlay | 是否在点击遮罩层后关闭 | *boolean* | `false` | - |
| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | - |
| before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | *(action, done) => void* | - | - |
| get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | *string \| () => HTMLElement* | - | - |
### Events