Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix docs #2599

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/select/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tips | TNode | - | 输入框下方提示文本,会根据不同的 `status` 呈
value | String / Number / Object / Array | - | 选中值。TS 类型:`SelectValue` `type SelectValue<T extends SelectOption = SelectOption> = string \| number \| T \| Array<SelectValue<T>>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts) | N
defaultValue | String / Number / Object / Array | - | 选中值。非受控属性。TS 类型:`SelectValue` `type SelectValue<T extends SelectOption = SelectOption> = string \| number \| T \| Array<SelectValue<T>>`。[详细类型定义](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`<br/>输入框失去焦点时触发 | N
onChange | Function | | TS 类型:`(value: SelectValue, context: { option?: T, selectedOptions: T[], trigger: SelectValueChangeTrigger; e?: MouseEvent \| KeyboardEvent }) => void`<br/>选中值变化时触发。`context.trigger` 表示触发变化的来源;`context.selectedOptions` 表示选中值的完整对象,数组长度一定和 `value` 相同;`context.option` 表示当前操作的选项,不一定存在。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/select/type.ts)。<br/>`type SelectValueChangeTrigger = 'clear' \| 'tag-remove' \| 'backspace' \| 'check' \| 'uncheck'`<br/> | N
onClear | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击清除按钮时触发 | N
Expand Down
3 changes: 2 additions & 1 deletion src/tree/tree.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-- | -- | -- | --
Expand Down
3 changes: 2 additions & 1 deletion src/tree/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ expanded | Boolean | - | 必需。当前节点是否展开 | Y
indeterminate | Boolean | - | 必需。当前节点是否处于半选状态 | Y
loading | Boolean | - | 必需。当前节点是否处于加载中状态 | Y
`TreeNodeState` | \- | - | 继承 `TreeNodeState` 中的全部属性 | N
### TreeNodeModel

### TreeNodeModelFunctions

名称 | 参数 | 返回值 | 描述
-- | -- | -- | --
Expand Down
Loading