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 @@
### Stylistic variants
Available stylistic values for the `ui` prop: `strong`.
Available stylistic values for the [`ui`](#props-ui) prop: `strong`.
[[ demo src="/demo/search-box/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/search-box/size.vue" ]]
@@ -28,19 +28,19 @@ Available size values for the `ui` prop: `xs`/`s`/`m`/`l`.
| Name | Type | Default | Description |
| -- | -- | -- | -- |
| `ui` | `string=` | - | [^ui] |
| `placeholder` | `string` | - | The placeholder text of the search box. |
| `value` | `string` | - | [^value] |
| `autofocus` | `boolean` | `false` | Whether the search box gains focus automatically. |
| `clearable` | `boolean` | `false` | Whether the clear button is displayed. |
| `select-on-focus` | `boolean` | `false` | Whether to select all content upon focus. |
| `composition` | `boolean` | `false` | Whether the search box triggers value change upon composition of IME. |
| `suggestions` | `Array<string>|Array<Object>` | - | [^suggestions] |
| `replace-on-select` | `boolean` | `true` | Whether to replace the content with suggestion item value when it's selected. |
| `suggest-trigger` | `Array<string>|string` | `input` | [^suggest-trigger] |
| `expanded` | `boolean=` | `false` | [^expanded] |
| `disabled` | `boolean=` | `false` | Whether the search box is disabled. |
| `readonly` | `boolean=` | `false` | Whether the search box is read-only. |
| ``ui`` | `string=` | - | [^ui] |
| ``placeholder`` | `string` | - | The placeholder text of the search box. |
| ``value`` | `string` | - | [^value] |
| ``autofocus`` | `boolean` | `false` | Whether the search box gains focus automatically. |
| ``clearable`` | `boolean` | `false` | Whether the clear button is displayed. |
| ``select-on-focus`` | `boolean` | `false` | Whether to select all content upon focus. |
| ``composition`` | `boolean` | `false` | Whether the search box triggers value change upon composition of IME. |
| ``suggestions`` | `Array<string>|Array<Object>` | - | [^suggestions] |
| ``replace-on-select`` | `boolean` | `true` | Whether to replace the content with suggestion item value when it's selected. |
| ``suggest-trigger`` | `Array<string>|string` | `input` | [^suggest-trigger] |
| ``expanded`` | `boolean=` | `false` | [^expanded] |
| ``disabled`` | `boolean=` | `false` | Whether the search box is disabled. |
| ``readonly`` | `boolean=` | `false` | Whether the search box is read-only. |
^^^ui
Style variants.
@@ -83,7 +83,7 @@ Specifies when the suggestion list is displayed. Can be either an event name or
| Value | Description |
| -- | -- |
| `focus` | When the search box is focused. |
| `input` | When the input triggers `input` event. |
| `input` | When the input triggers [`input`](#events-input) event. |
| `submit` | When the submit button is activated. |
+++
^^^
@@ -100,10 +100,10 @@ Whether the suggestion list is expanded (if there are no items in `suggestions`,
| Name | Description |
| -- | -- |
| `suggestions` | [^slot-suggestions] |
| `suggestions-before` | The content before the suggestion list. |
| `suggestions-after` | The content after the suggestion list. |
| `suggestion` | [^slot-suggestion] |
| ``suggestions`` | [^slot-suggestions] |
| ``suggestions-before`` | The content before the suggestion list. |
| ``suggestions-after`` | The content after the suggestion list. |
| ``suggestion`` | [^slot-suggestion] |
^^^slot-suggestions
The content of the entire suggestion list.
@@ -111,7 +111,7 @@ The content of the entire suggestion list.
+++Scope properties
| Name | Type | Description |
| -- | -- | -- |
| `suggestions` | `Array<{value: string, label: string}>` | The normalized suggestions from the `suggestions` prop. |
| `suggestions` | `Array<{value: string, label: string}>` | The normalized suggestions from the [`suggestions`](#props-suggestions) prop. |
| `select` | `function(suggestion: {value: string, label: string}): void` | Select the specified suggestion. |
^^^slot-suggestion
@@ -133,11 +133,11 @@ When `suggestions` is an `Array<string>`, the `label` and `value` of the suggest
| Name | Description |
| -- | -- |
| `input` | [^event-input] |
| `suggest` | [^event-suggest] |
| `select` | [^event-select] |
| `search` | [^event-search] |
| `toggle` | Triggered when the expanded state is going to change. The callback parameter list is `(expanded: boolean)`. `expanded` denotes whether the suggestion list is to be expanded or collapsed. |
| ``input`` | [^event-input] |
| ``suggest`` | [^event-suggest] |
| ``select`` | [^event-select] |
| ``search`` | [^event-search] |
| ``toggle`` | Triggered when the expanded state is going to change. The callback parameter list is `(expanded: boolean)`. `expanded` denotes whether the suggestion list is to be expanded or collapsed. |
^^^event-input
Triggers when the input value changes. The callback parameter list is `(value: string)`.
@@ -184,4 +184,4 @@ Triggered when the input value is submitted. The callback parameter list is `(va
| Name | Description |
| -- | -- |
| `search` | Search. |
| ``search`` | Search. |