feat: add link for individual props/events/slots/configs/icons

This commit is contained in:
Justineo
2021-10-20 01:11:27 +08:00
parent df2b6892d2
commit b0dcdbb873
162 changed files with 2176 additions and 2073 deletions

View File

@@ -4,13 +4,13 @@
### Types
`Alert` component has 4 contextual types, which are `success`, `info`, `warning` and `error`. Types are specified with the `type` prop.
`Alert` component has 4 contextual types, which are `success`, `info`, `warning` and `error`. Types are specified with the [`type`](#props-type) prop.
[[ demo src="/demo/alert/type.vue" ]]
### Multiple messages
The `message` prop can be an array to display multiple switchable messages.
The [`message`](#props-message) prop can be an array to display multiple switchable messages.
[[ demo src="/demo/alert/multiple.vue" ]]
@@ -20,12 +20,12 @@ The `message` prop can be an array to display multiple switchable messages.
| Name | Type | Default | Description |
| -- | -- | -- | -- |
| `type` | `string=` | `'success'` | [^type] |
| `title` | `string` | - | The alert title. |
| `message` | `string|Array<string>` | - | The alert message. When specified as an array, multiple messages will be displayed with previous/next navigation. |
| `closable` | `boolean=` | `false` | Whether the alert is allowed to be closed by users. |
| `open` | `boolean=` | `true` | [^open] |
| `index` | `number=` | `0` | [^index] |
| ``type`` | `string=` | `'success'` | [^type] |
| ``title`` | `string` | - | The alert title. |
| ``message`` | `string | Array<string>` | - | The alert message. When specified as an array, multiple messages will be displayed with previous/next navigation. |
| ``closable`` | `boolean=` | `false` | Whether the alert is allowed to be closed by users. |
| ``open`` | `boolean=` | `true` | [^open] |
| ``index`` | `number=` | `0` | [^index] |
^^^type
The contextual type of the alert message.
@@ -60,10 +60,10 @@ The index of current message displayed when having multiple messages.
| Name | Description |
| -- | -- |
| `default` | [^slot-default] |
| `title` | The content area of the alert title. |
| `extra` | The extra content after the alert message. |
| `content` | The content of the whole component, including message text, status icon, previous/next navigation and close button. |
| ``default`` | [^slot-default] |
| ``title`` | The content area of the alert title. |
| ``extra`` | The extra content after the alert message. |
| ``content`` | The content of the whole component, including message text, status icon, previous/next navigation and close button. |
^^^slot-default
The content of the message.
@@ -82,10 +82,10 @@ Default: message text.
| Name | Description |
| -- | -- |
| `success` | Success message. |
| `warning` | Warning message. |
| `info` | Information message. |
| `error` | Error message. |
| `prev` | Previous message. |
| `next` | Next message. |
| `close` | Close alert. |
| ``success`` | Success message. |
| ``warning`` | Warning message. |
| ``info`` | Information message. |
| ``error`` | Error message. |
| ``prev`` | Previous message. |
| ``next`` | Next message. |
| ``close`` | Close alert. |