docs(message): API Table (#629)

This commit is contained in:
Yugang Cao 2021-07-25 00:53:08 +08:00 committed by GitHub
parent e99e8a1c35
commit 6bb996c939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 26 deletions

View File

@ -60,18 +60,18 @@ multiple-line
| Name | Type | Description |
| --- | --- | --- |
| error | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| info | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| loading | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| success | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| warning | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| error | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | Use error type message. |
| info | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | Use info type message. |
| loading | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | Use loading type message. |
| success | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | Use success type message. |
| warning | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | Use warning type message. |
#### MessageOption Properties
| Name | Type | Description |
| ------------ | ------------- | ----------------------------------------- |
| closable | `boolean` | |
| duration | `number` | |
| closable | `boolean` | Whether to show close icon. |
| duration | `number` | The duration of the message. |
| icon | `() => VNode` | Message icon. |
| onAfterLeave | `() => void` | Callback after message disappeared. |
| onClose | `() => void` | Callback when close icon is clicked. |
@ -81,19 +81,19 @@ multiple-line
| Name | Type | Description |
| --- | --- | --- |
| closable | `boolean` | |
| closable | `boolean` | Whether to show close icon. |
| content | `string \| (() => VNodeChild)` | Message content. |
| destory | `() => void` | |
| destory | `() => void` | Message destory method. |
| icon | `() => VNode` | Message icon. |
| type | `'info' \| 'success' \| 'warning' \| 'error' \| 'loading'` | |
| type | `'info' \| 'success' \| 'warning' \| 'error' \| 'loading'` | Message type. |
| onAfterLeave | `() => void` | Callback after message disappeared. |
| onLeave | `() => void` | Callback when message start to disappear. |
#### MessageReactive Methods
| Name | Type | Description |
| ------- | ---- | ----------- |
| destroy | `()` | |
| Name | Type | Description |
| ------- | ---- | ----------------------- |
| destroy | `()` | Message destory method. |
## Q & A

View File

@ -60,18 +60,18 @@ multiple-line
| 名称 | 类型 | 说明 |
| --- | --- | --- |
| error | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| info | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| loading | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| success | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| warning | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | |
| error | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | 调用 error 类型的信息 |
| info | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | 调用 info 类型的信息 |
| loading | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | 调用 loading 类型的信息 |
| success | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | 调用 success 类型的信息 |
| warning | `(content: string \| (() => VNodeChild), option?: MessageOption) => MessageReactive` | 调用 warning 类型的信息 |
#### MessageOption Properties
| 名称 | 类型 | 说明 |
| ------------ | ------------- | ---------------------- |
| closable | `boolean` | |
| duration | `number` | |
| closable | `boolean` | 是否显示 close 图标 |
| duration | `number` | 信息展示的时长 |
| icon | `() => VNode` | 信息图标 |
| onAfterLeave | `() => void` | 信息消失动画结束的回调 |
| onClose | `() => void` | 点击关闭图标的回调 |
@ -81,19 +81,19 @@ multiple-line
| 名称 | 类型 | 说明 |
| --- | --- | --- |
| closable | `boolean` | |
| closable | `boolean` | 是否显示 close 图标 |
| content | `string \| (() => VNodeChild)` | 信息内容 |
| destory | `() => void` | |
| destory | `() => void` | 销毁信息的方法 |
| icon | `() => VNode` | 信息图标 |
| type | `'info' \| 'success' \| 'warning' \| 'error' \| 'loading'` | |
| type | `'info' \| 'success' \| 'warning' \| 'error' \| 'loading'` | 信息类型 |
| onAfterLeave | `() => void` | 信息消失动画结束的回调 |
| onLeave | `() => void` | 信息开始消失的回调 |
#### MessageReactive Methods
| 名称 | 类型 | 说明 |
| ------- | ---- | ---- |
| destroy | `()` | |
| 名称 | 类型 | 说明 |
| ------- | ---- | -------------- |
| destroy | `()` | 销毁信息的方法 |
## Q & A