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

@@ -1,7 +1,7 @@
# Icon
:::tip
VEUI's `Icon` component is compatible with [Vue-Awesome](https://github.com/Justineo/vue-awesome), including icon registration and specifying icon with a string-typed `name` prop. The `name` prop also accept a component definition directly.
VEUI's `Icon` component is compatible with [Vue-Awesome](https://github.com/Justineo/vue-awesome), including icon registration and specifying icon with a string-typed [`name`](#props-name) prop. The [`name`](#props-name) prop also accept a component definition directly.
:::
## Demos
@@ -14,20 +14,20 @@ VEUI's `Icon` component is compatible with [Vue-Awesome](https://github.com/Just
| Name | Type | Default | Description |
| -- | -- | -- | -- |
| `name` | `string|Object` | - | The name of the icon or its component definition. |
| `label` | `string` | - | The descriptive label for the icon, which is accessible to assistive devices. The icon is hidden for assistive devices if `label` doesn't exist. |
| `scale` | `number` | - | The size scale of the icon. Doesn't scale by default. |
| `spin` | `boolean` | `false` | Whether the icon should be spinning. |
| `pulse` | `boolean` | `false` | Whether the icon should be pulsing. |
| `inverse` | `boolean` | `false` | Whether to inverse the color. (Having a white foreground to be used against dark backgrounds.) |
| `flip` | `string` | - | How to flip an icon. Can be either `'horizontal'` or `'vertical'`. |
| ``name`` | `string | Object` | - | The name of the icon or its component definition. |
| ``label`` | `string` | - | The descriptive label for the icon, which is accessible to assistive devices. The icon is hidden for assistive devices if `label` doesn't exist. |
| ``scale`` | `number` | - | The size scale of the icon. Doesn't scale by default. |
| ``spin`` | `boolean` | `false` | Whether the icon should be spinning. |
| ``pulse`` | `boolean` | `false` | Whether the icon should be pulsing. |
| ``inverse`` | `boolean` | `false` | Whether to inverse the color. (Having a white foreground to be used against dark backgrounds.) |
| ``flip`` | `string` | - | How to flip an icon. Can be either `'horizontal'` or `'vertical'`. |
:::warning
When specifying a component definition for the `name` prop, only `spin` prop is supported.
When specifying a component definition for the [`name`](#props-name) prop, only [`spin`](#props-spin) prop is supported.
:::
### Slots
| Name | Description |
| -- | -- |
| `default` | Can be used to implement a stacked icon. The embedded `Icon` components will be stacked together, being centered. The wrapper `Icon` doesn't require the `name` prop. |
| ``default`` | Can be used to implement a stacked icon. The embedded `Icon` components will be stacked together, being centered. The wrapper `Icon` doesn't require the [`name`](#props-name) prop. |