From b2cb222cbca7e6b837622faa74c0d1cd707eb2b5 Mon Sep 17 00:00:00 2001 From: Uyarn Date: Wed, 15 Nov 2023 10:50:45 +0800 Subject: [PATCH] chore: fix docs --- src/select/select.md | 2 +- src/tree/tree.en-US.md | 3 ++- src/tree/tree.md | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/select/select.md b/src/select/select.md index d3214a8f21..c066d31b18 100644 --- a/src/select/select.md +++ b/src/select/select.md @@ -50,7 +50,7 @@ tips | TNode | - | 输入框下方提示文本,会根据不同的 `status` 呈 value | String / Number / Object / Array | - | 选中值。TS 类型:`SelectValue` `type SelectValue = string \| number \| T \| Array>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts) | N defaultValue | String / Number / Object / Array | - | 选中值。非受控属性。TS 类型:`SelectValue` `type SelectValue = string \| number \| T \| Array>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts) | N valueDisplay | TNode | - | 自定义选中项呈现的内容。TS 类型:`string \| TNode<{ value: SelectValue; onClose: (index: number) => void; displayValue?: SelectValue }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -valueType | String | value | 用于控制选中值的类型。假设数据选项为:`[{ label: '姓名', value: 'name' }]`,value 表示值仅返回数据选项中的 value, object 表示值返回全部数据。。可选项:value/object | N +valueType | String | value | 用于控制选中值的类型。假设数据选项为:`[{ label: '姓名', value: 'name' }]`,value 表示值仅返回数据选项中的 value, object 表示值返回全部数据。可选项:value/object | N onBlur | Function | | TS 类型:`(context: { value: SelectValue; e: FocusEvent \| KeyboardEvent }) => void`
输入框失去焦点时触发 | N onChange | Function | | TS 类型:`(value: SelectValue, context: { option?: T, selectedOptions: T[], trigger: SelectValueChangeTrigger; e?: MouseEvent \| KeyboardEvent }) => void`
选中值变化时触发。`context.trigger` 表示触发变化的来源;`context.selectedOptions` 表示选中值的完整对象,数组长度一定和 `value` 相同;`context.option` 表示当前操作的选项,不一定存在。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts)。
`type SelectValueChangeTrigger = 'clear' \| 'tag-remove' \| 'backspace' \| 'check' \| 'uncheck'`
| N onClear | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
点击清除按钮时触发 | N diff --git a/src/tree/tree.en-US.md b/src/tree/tree.en-US.md index 3311101401..0b624c5d7e 100644 --- a/src/tree/tree.en-US.md +++ b/src/tree/tree.en-US.md @@ -99,7 +99,8 @@ expanded | Boolean | - | required | Y indeterminate | Boolean | - | required | Y loading | Boolean | - | required | Y `TreeNodeState` | \- | - | extends `TreeNodeState` | N -### TreeNodeModel + +### TreeNodeModelFunctions name | params | return | description -- | -- | -- | -- diff --git a/src/tree/tree.md b/src/tree/tree.md index 7050267746..f781b7b828 100644 --- a/src/tree/tree.md +++ b/src/tree/tree.md @@ -99,7 +99,8 @@ expanded | Boolean | - | 必需。当前节点是否展开 | Y indeterminate | Boolean | - | 必需。当前节点是否处于半选状态 | Y loading | Boolean | - | 必需。当前节点是否处于加载中状态 | Y `TreeNodeState` | \- | - | 继承 `TreeNodeState` 中的全部属性 | N -### TreeNodeModel + +### TreeNodeModelFunctions 名称 | 参数 | 返回值 | 描述 -- | -- | -- | --