Skip to content
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
Binary file modified db/TDesign.db
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ suffixIcon | TElement | - | 组件后置图标。TS 类型:`TNode`。[通用
tagInputProps | Object | - | 透传 TagInput 标签输入框组件的全部属性。TS 类型:`TagInputProps`,[TagInput API Documents](./tag-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/select/type.ts) | N
tagProps | Object | - | 透传 Tag 标签组件全部属性。TS 类型:`TagProps`,[Tag API Documents](./tag?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/select/type.ts) | N
tips | TNode | - | 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
value | String / Number / Boolean / Object / Array | - | 选中值。TS 类型:`SelectValue` `type SelectValue<T extends SelectOption = SelectOption> = string \| number \| boolean \| T \| Array<SelectValue<T>>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/select/type.ts) | N
defaultValue | String / Number / Boolean / Object / Array | - | 选中值。非受控属性。TS 类型:`SelectValue` `type SelectValue<T extends SelectOption = SelectOption> = string \| number \| boolean \| T \| Array<SelectValue<T>>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/select/type.ts) | N
value | String / Number / Boolean / Object / Array / BigInt | - | 选中值。TS 类型:`SelectValue` `type SelectValue<T extends SelectOption = SelectOption> = string \| number \| bigint \| boolean \| T \| Array<SelectValue<T>>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/select/type.ts) | N
defaultValue | String / Number / Boolean / Object / Array / BigInt | - | 选中值。非受控属性。TS 类型:`SelectValue` `type SelectValue<T extends SelectOption = SelectOption> = string \| number \| bigint \| boolean \| T \| Array<SelectValue<T>>`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/select/type.ts) | N
valueDisplay | TNode | - | 自定义选中项呈现的内容。TS 类型:`string \| TNode<{ value: SelectValue; onClose: (index: number) => void; displayValue?: SelectValue; label?: string }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | 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
Expand All @@ -77,7 +77,7 @@ content | TNode | - | 用于定义复杂的选项内容。TS 类型:`string \|
disabled | Boolean | false | 是否禁用该选项 | N
label | String | - | 选项名称 | N
title | String | - | 选项标题,在选项过长时hover选项展示 | N
value | String / Number / Boolean | - | 选项值 | N
value | String / Number / Boolean / BigInt | - | 选项值 | N


### OptionGroup Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export interface TdOptionProps {
/**
* 选项值
*/
value?: string | number | boolean;
value?: string | number | boolean | bigint;
}

export interface TdOptionGroupProps {
Expand All @@ -321,7 +321,13 @@ export interface SelectKeysType {
disabled?: string;
}

export type SelectValue<T extends SelectOption = SelectOption> = string | number | boolean | T | Array<SelectValue<T>>;
export type SelectValue<T extends SelectOption = SelectOption> =
| string
| number
| bigint
| boolean
| T
| Array<SelectValue<T>>;

export type SelectValueChangeTrigger = 'clear' | 'tag-remove' | 'backspace' | 'check' | 'uncheck' | 'default';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export default {
},
/** 选项值 */
value: {
type: [String, Number, Boolean] as PropType<TdOptionProps['value']>,
type: [String, Number, Boolean, BigInt] as PropType<TdOptionProps['value']>,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,16 @@ export default {
},
/** 选中值 */
value: {
type: [String, Number, Boolean, Object, Array] as PropType<TdSelectProps['value']>,
type: [String, Number, Boolean, Object, Array, BigInt] as PropType<TdSelectProps['value']>,
default: undefined as TdSelectProps['value'],
},
modelValue: {
type: [String, Number, Boolean, Object, Array] as PropType<TdSelectProps['value']>,
type: [String, Number, Boolean, Object, Array, BigInt] as PropType<TdSelectProps['value']>,
default: undefined as TdSelectProps['value'],
},
/** 选中值,非受控属性 */
defaultValue: {
type: [String, Number, Boolean, Object, Array] as PropType<TdSelectProps['defaultValue']>,
type: [String, Number, Boolean, Object, Array, BigInt] as PropType<TdSelectProps['defaultValue']>,
},
/** 自定义选中项呈现的内容 */
valueDisplay: {
Expand Down
Loading