Skip to content

Commit e631dde

Browse files
authored
Merge pull request #493 from panbibi/dev
doc(TreeSelect):修改TreeSelect api文档
2 parents 81e3092 + 4932380 commit e631dde

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

packages/core/src/TreeSelect/README.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -213,26 +213,14 @@ function Demo() {
213213
export default Demo
214214
```
215215

216+
### Props
216217

217-
### TransitionImage Props
218+
| 参数 | 说明 | 类型 | 默认值 |
219+
|------|------|-----|------|
220+
| options | 级联数据 | TreeSelectOption[] | - |
221+
| defaultValue | 默认选中项 | string[] | - |
222+
| value | 选中项 | string[] | - |
223+
| onChange | value 变化时触发 | (value: string[], extend: { options: TreeSelectOption[] }) => void | - |
224+
| fieldNames | 自定义 options 中 label value children 的字段 | {{ label: string, value: string, children: string }} \| any | - |
225+
| activeColor | 选中文本颜色 | `string` | - |
218226

219-
```ts
220-
export interface TreeSelectOption {
221-
[key: string]: any
222-
}
223-
224-
export type TreeSelectProps = {
225-
// 级联数据
226-
options: TreeSelectOption[]
227-
// 默认选中项
228-
defaultValue?: string[]
229-
// 选中项
230-
value?: string[]
231-
// value 变化时触发
232-
onChange?: (value: string[], extend: { options: TreeSelectOption[] }) => void
233-
// 自定义 options 中 label value children 的字段
234-
fieldNames?: {{ label: string, value: string, children: string } } | any
235-
// 选中文本颜色
236-
activeColor?:ColorValue
237-
}
238-
```

0 commit comments

Comments
 (0)