feat: add link for individual props/events/slots/configs/icons
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
### Size variants
|
||||
|
||||
Available size variants for the `ui` prop: `s`/`m`.
|
||||
Available size variants for the [`ui`](#props-ui) prop: `s` / `m`.
|
||||
|
||||
[[ demo src="/demo/transfer/size.vue" ]]
|
||||
|
||||
@@ -26,18 +26,18 @@ Available size variants for the `ui` prop: `s`/`m`.
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| `ui` | `string=` | - | [^ui] |
|
||||
| `datasource` | `Array<Object>` | `[]` | [^datasource] |
|
||||
| `searchable` | `boolean=` | `true` | Whether to allow search. |
|
||||
| `filter` | `function=` | See description | [^filter] |
|
||||
| `selected` | `Array=` | `[]` | [^selected] |
|
||||
| `candidate-placeholder` | `string=` | - | The placeholder text in the search input of the candidate panel. |
|
||||
| `selected-placeholder` | `string=` | - | The placeholder text in the search input of the selected panel. |
|
||||
| `candidate-label` | `string=` | - | The title of the candidates panel. |
|
||||
| `selected-label` | `string=` | - | The title of the selected panel. |
|
||||
| `selected-show-mode` | `string=` | `'tree'` | [^selected-show-mode] |
|
||||
| `keys` | `string|function=` | `'value'` | The customized unique key for `datasource` items. String values can be used to specify which field value is used. Also a function can bu used to specify a customized key value. |
|
||||
| `merge-checked` | `string=` | `keep-all` | [^merge-checked] |
|
||||
| ``ui`` | `string=` | - | [^ui] |
|
||||
| ``datasource`` | `Array<Object>` | `[]` | [^datasource] |
|
||||
| ``searchable`` | `boolean=` | `true` | Whether to allow search. |
|
||||
| ``filter`` | `function=` | See description | [^filter] |
|
||||
| ``selected`` | `Array=` | `[]` | [^selected] |
|
||||
| ``candidate-placeholder`` | `string=` | - | The placeholder text in the search input of the candidate panel. |
|
||||
| ``selected-placeholder`` | `string=` | - | The placeholder text in the search input of the selected panel. |
|
||||
| ``candidate-label`` | `string=` | - | The title of the candidates panel. |
|
||||
| ``selected-label`` | `string=` | - | The title of the selected panel. |
|
||||
| ``selected-show-mode`` | `string=` | `'tree'` | [^selected-show-mode] |
|
||||
| ``keys`` | `string | function=` | `'value'` | The customized unique key for `datasource` items. String values can be used to specify which field value is used. Also a function can bu used to specify a customized key value. |
|
||||
| ``merge-checked`` | `string=` | `keep-all` | [^merge-checked] |
|
||||
|
||||
^^^ui
|
||||
Style variants.
|
||||
@@ -68,11 +68,11 @@ The filter function. The function signature is `function(from, keyword, item, in
|
||||
+++Parameters
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| `from` | `string` | The source of search. Available values are `'candidate'`/`'selected'`. `'candidate'` means search is triggered from the candidate panel, `'selected'` means from the selected panel. |
|
||||
| `from` | `string` | The source of search. Available values are `'candidate'` / `'selected'`. `'candidate'` means search is triggered from the candidate panel, `'selected'` means from the selected panel. |
|
||||
| `keyword` | `string` | The search keyword. |
|
||||
| `item` | `Object` | Each item in `datasource`. |
|
||||
| `index` | `number` | The index of each item among its siblings. |
|
||||
| `datasource` | `Array<{label: string, ...}>` | Same as the `datasource` prop. |
|
||||
| `datasource` | `Array<{label: string, ...}>` | same as the [`datasource`](#props-datasource) prop. |
|
||||
+++
|
||||
|
||||
+++Default value
|
||||
@@ -91,7 +91,7 @@ function (keyword, { label }) {
|
||||
`v-model`
|
||||
:::
|
||||
|
||||
The selected values which is the `value` array of `datasource` items (affected by the `keys` prop).
|
||||
The selected values which is the `value` array of `datasource` items (affected by the [`keys`](#props-keys) prop).
|
||||
^^^
|
||||
|
||||
^^^selected-show-mode
|
||||
@@ -122,17 +122,17 @@ Merge strategy for selected values. When all child nodes under a node are select
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| `candidate` | The candidate panel. |
|
||||
| `candidate-head` | [^candidate-head] |
|
||||
| `selected-head` | [^selected-head] |
|
||||
| `candidate-title` | The title text of the candidate panel. Shares the same scope properties with slot `candidate-head`. |
|
||||
| `selected-title` | The title text of the selected panel. Shares the same scope properties with slot `selected-head`. |
|
||||
| `candidate-no-data` | The content displayed when there's no data inside the candidate panel. |
|
||||
| `selected-no-data` | The content displayed when there's no data inside the selected panel. |
|
||||
| `candidate-item` | [^candidate-item] |
|
||||
| `selected-item` | [^selected-item] |
|
||||
| `candidate-item-label` | Label text of each item inside the candidate panel. Shares the same scope properties with slot `candidate-item`. |
|
||||
| `selected-item-label` | Label text of each item inside the selected panel. Shares the same scope properties with slot `selected-item` when `selected-show-mode` is `'tree'`. Otherwise this slot specifies custom content for any item along the path for all selected leaf item and shares the same scope properties with slot `candidate-item`. |
|
||||
| ``candidate`` | The candidate panel. |
|
||||
| ``candidate-head`` | [^candidate-head] |
|
||||
| ``selected-head`` | [^selected-head] |
|
||||
| ``candidate-title`` | The title text of the candidate panel. Shares the same scope properties with slot `candidate-head`. |
|
||||
| ``selected-title`` | The title text of the selected panel. Shares the same scope properties with slot `selected-head`. |
|
||||
| ``candidate-no-data`` | The content displayed when there's no data inside the candidate panel. |
|
||||
| ``selected-no-data`` | The content displayed when there's no data inside the selected panel. |
|
||||
| ``candidate-item`` | [^candidate-item] |
|
||||
| ``selected-item`` | [^selected-item] |
|
||||
| ``candidate-item-label`` | Label text of each item inside the candidate panel. Shares the same scope properties with slot `candidate-item`. |
|
||||
| ``selected-item-label`` | Label text of each item inside the selected panel. Shares the same scope properties with slot `selected-item` when `selected-show-mode` is `'tree'`. Otherwise this slot specifies custom content for any item along the path for all selected leaf item and shares the same scope properties with slot `candidate-item`. |
|
||||
|
||||
^^^candidate-head
|
||||
The head area of the candidate panel.
|
||||
@@ -183,15 +183,15 @@ The scope properties will be the same as slot `candidate-item` when `selected-sh
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| `select` | Triggered when user changes selection. The callback parameter list is `(selected: Array<string>)` and `selected` is the array of `value` properties of selected items.
|
||||
| ``select`` | Triggered when user changes selection. The callback parameter list is `(selected: Array<string>)` and `selected` is the array of `value` properties of selected items.
|
||||
|
||||
### Icons
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| `checked` | The checked state. |
|
||||
| `select` | Select items. |
|
||||
| `remove` | Remove items. |
|
||||
| `expand` | Click to expand (currently being collapsed). |
|
||||
| `collapse` | Click to collapse (currently being expanded). |
|
||||
| `separator` | The separator between level labels when `selected-show-mode` is `'flat'`. |
|
||||
| ``checked`` | The checked state. |
|
||||
| ``select`` | Select items. |
|
||||
| ``remove`` | Remove items. |
|
||||
| ``expand`` | Click to expand (currently being collapsed). |
|
||||
| ``collapse`` | Click to collapse (currently being expanded). |
|
||||
| ``separator`` | The separator between level labels when `selected-show-mode` is `'flat'`. |
|
||||
|
||||
Reference in New Issue
Block a user