docs(components): [tree-select] use new display tag (#12663)

* docs(components): [tree-select] use new display tag

* docs(components): [tree-select] add cache option type
This commit is contained in:
wzc520pyfm
2023-05-16 09:08:47 +08:00
committed by GitHub
parent daf6c080c7
commit 84d331edae
2 changed files with 25 additions and 5 deletions

View File

@@ -95,7 +95,9 @@ tree-select/lazy
:::
## Attributes
## API
### Attributes
Since this component combines the functions of components `el-tree` and `el-select`,
the original properties have not been changed, so no repetition here,
@@ -106,8 +108,23 @@ and please go to the original component to view the documentation.
| [tree](./tree.md#attributes) | [tree](./tree.md#method) | [tree](./tree.md#events) | [tree](./tree.md#slots) |
| [select](./select.md#select-attributes) | [select](./select.md#methods) | [select](./select.md#select-events) | [select](./select.md#select-slots) |
### Own Attributes
#### Own Attributes
| Name | Description | Type | Accepted Values | Default |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----- | --------------- | ------- |
| cacheData **(\> 2.2.26)** | The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data | array | — | — |
| Name | Description | Type | Default |
| ------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------ | ------- |
| cacheData ^(2.2.26) | The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data | ^[object]`CacheOption[]` | [] |
## Type Declarations
<details>
<summary>Show declarations</summary>
```ts
type CacheOption = {
value: string | number | boolean | object
currentLabel: string | number
isDisabled: boolean
}
```
</details>

View File

@@ -15,6 +15,9 @@ export default defineComponent({
props: {
...ElSelect.props,
...ElTree.props,
/**
* @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data
*/
cacheData: {
type: Array,
default: () => [],