feat: add link for individual props/events/slots/configs/icons
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
|
||||
### Style variants
|
||||
|
||||
Available style variants for the `ui` prop: `primary`/`text`.
|
||||
Available style variants for the [`ui`](#props-ui) prop: `primary` / `text`.
|
||||
|
||||
[[ demo src="/demo/dropdown/style.vue" ]]
|
||||
|
||||
### Size variants
|
||||
|
||||
Available size values for the `ui` prop: `xs`/`s`/`m`/`l`.
|
||||
Available size values for the [`ui`](#props-ui) prop: `xs` / `s` / `m` / `l`.
|
||||
|
||||
[[ demo src="/demo/dropdown/size.vue" ]]
|
||||
|
||||
@@ -26,7 +26,7 @@ Can be used with embedded `OptionGroup`s & `Option`s.
|
||||
|
||||
### Searchable dropdown
|
||||
|
||||
Using`searchable` prop to make the component support search functionality.
|
||||
Using[`searchable`](#props-searchable) prop to make the component support search functionality.
|
||||
|
||||
[[ demo src="/demo/dropdown/searchable.vue" ]]
|
||||
|
||||
@@ -38,7 +38,7 @@ Use the `disabled` property in `options` items to disable single option.
|
||||
|
||||
### Trigger and split
|
||||
|
||||
Use the `trigger` prop to specify when to open the dropdown menu. Use the `split` prop to separate command button and dropdown button.
|
||||
Use the [`trigger`](#props-trigger) prop to specify when to open the dropdown menu. Use the [`split`](#props-split) prop to separate command button and dropdown button.
|
||||
|
||||
[[ demo src="/demo/dropdown/other.vue" ]]
|
||||
|
||||
@@ -48,15 +48,15 @@ Use the `trigger` prop to specify when to open the dropdown menu. Use the `split
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| `ui` | `string=` | - | [^ui] |
|
||||
| `options` | `Array<Object>=` | `[]` | [^options] |
|
||||
| `label` | `string` | - | The descriptive label of the dropdown button. |
|
||||
| `trigger` | `string=` | `'click'` | When to trigger the dropdown to open. Available values are `'click'`/`'hover'`. |
|
||||
| `split` | `boolean=` | `false` | Whether to split the dropdown button into a command button and a toggle button for the dropdown layer. |
|
||||
| `expanded` | `boolean=` | `false` | [^expanded] |
|
||||
| `disabled` | `boolean=` | `false` | Whether the dropdown is disabled. |
|
||||
| `overlay-class` | `string|Array|Object=` | - | See the [`overlay-class`](./overlay#props) prop of the [`Overlay`](./overlay) component. |
|
||||
| `overlay-style` | `string|Array|Object=` | - | See the [`overlay-style`](./overlay#props) prop of the [`Overlay`](./overlay) component. |
|
||||
| ``ui`` | `string=` | - | [^ui] |
|
||||
| ``options`` | `Array<Object>=` | `[]` | [^options] |
|
||||
| ``label`` | `string` | - | The descriptive label of the dropdown button. |
|
||||
| ``trigger`` | `string=` | `'click'` | When to trigger the dropdown to open. Available values are `'click'` / `'hover'`. |
|
||||
| ``split`` | `boolean=` | `false` | Whether to split the dropdown button into a command button and a toggle button for the dropdown layer. |
|
||||
| ``expanded`` | `boolean=` | `false` | [^expanded] |
|
||||
| ``disabled`` | `boolean=` | `false` | Whether the dropdown is disabled. |
|
||||
| ``overlay-class`` | `string | Array | Object=` | - | See the [`overlay-class`](./overlay#props-overlay-class) prop of the [`Overlay`](./overlay) component. |
|
||||
| ``overlay-style`` | `string | Array | Object=` | - | See the [`overlay-style`](./overlay#props-overlay-style) prop of the [`Overlay`](./overlay) component. |
|
||||
|
||||
^^^ui
|
||||
Style variants.
|
||||
@@ -80,7 +80,7 @@ The list of options with the option type being `{label, value, dropdown, disable
|
||||
| -- | -- | -- |
|
||||
| `label` | `string` | The descriptive label of the option. |
|
||||
| `value` | `*` | The value of the option. |
|
||||
| `options` | `Array<Object>=` | The child options of current option. The item type is the same as the items of the `options` prop. |
|
||||
| `options` | `Array<Object>=` | The child options of current option. The item type is the same as the items of the [`options`](#props-options) prop. |
|
||||
| `disabled` | `boolean=` | Whether the option is disabled. |
|
||||
+++
|
||||
^^^
|
||||
@@ -97,17 +97,17 @@ Whether the dropdown menu is expanded.
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| `default` | The content of the options dropdown layer. Can be used to place `Option`s or `OptionGroups`s when the `options` prop is not specified. |
|
||||
| `before` | The content before the options in the dropdown layer. |
|
||||
| `after` | The content after the options in the dropdown layer. |
|
||||
| `label` | [^slot-label] |
|
||||
| `group-label` | [^slot-group-label] |
|
||||
| `option-label` | [^slot-option-label] |
|
||||
| `option` | [^slot-option] |
|
||||
| `trigger` | [^slot-trigger] |
|
||||
| ``default`` | The content of the options dropdown layer. Can be used to place `Option`s or `OptionGroups`s when the [`options`](#props-options) prop is not specified. |
|
||||
| ``before`` | The content before the options in the dropdown layer. |
|
||||
| ``after`` | The content after the options in the dropdown layer. |
|
||||
| ``label`` | [^slot-label] |
|
||||
| ``group-label`` | [^slot-group-label] |
|
||||
| ``option-label`` | [^slot-option-label] |
|
||||
| ``option`` | [^slot-option] |
|
||||
| ``trigger`` | [^slot-trigger] |
|
||||
|
||||
^^^slot-label
|
||||
The content of the select button. Displays the `label` prop by default.
|
||||
The content of the select button. Displays the [`label`](#props-label) prop by default.
|
||||
|
||||
+++Scope properties
|
||||
| Name | Type | Description |
|
||||
@@ -165,7 +165,7 @@ The entire drop-down trigger area. Displays the dropdown button by default.
|
||||
+++Scope properties
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `attrs` | `Object` | Attributes that need to be output to the trigger element, including `aria-*`/`disabled`, etc., can be output using `v-bind="attrs"`. |
|
||||
| `attrs` | `Object` | Attributes that need to be output to the trigger element, including `aria-*` / `disabled`, etc., can be output using `v-bind="attrs"`. |
|
||||
| `handlers` | `Object` | [^handlers-desc] |
|
||||
| `expanded` | `boolean` | Whether the dropdown menu is expanded or not. |
|
||||
| `toggle` | `function(force?: boolean): void` | Used to toggle the expanded state of the dropdown menu. |
|
||||
@@ -184,12 +184,12 @@ The element used to bind `handlers` needs to support focus acquisition so that v
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| `click` | Triggered when an option is clicked. The callback parameter list is `(value: *=)`. `value` is the `value` property of the option being clicked. Also triggered when `split` is `true` and the command button is clicked, in this case there won't be a `value` argument. |
|
||||
| `toggle` | Triggered when the expanded state is going to change. The callback parameter list is `(expanded: boolean)`. `expanded` denotes whether the dropdown menu is to be expanded or collapsed. |
|
||||
| ``click`` | Triggered when an option is clicked. The callback parameter list is `(value: *=)`. `value` is the `value` property of the option being clicked. Also triggered when `split` is `true` and the command button is clicked, in this case there won't be a `value` argument. |
|
||||
| ``toggle`` | Triggered when the expanded state is going to change. The callback parameter list is `(expanded: boolean)`. `expanded` denotes whether the dropdown menu is to be expanded or collapsed. |
|
||||
|
||||
### Icons
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| `expand` | Expand the dropdown layer. |
|
||||
| `collapse` | Collapse the dropdown layer. |
|
||||
| ``expand`` | Expand the dropdown layer. |
|
||||
| ``collapse`` | Collapse the dropdown layer. |
|
||||
|
||||
Reference in New Issue
Block a user