Skip to content

Commit 5b0a622

Browse files
committed
fix(select): 修复 option value 为 boolean 时控制台类型错误警告(Tencent#4922)
1 parent 954db10 commit 5b0a622

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/select/option-props.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ export default {
3232
},
3333
/** 选项值 */
3434
value: {
35-
type: [String, Number] as PropType<TdOptionProps['value']>,
35+
type: [String, Number, Boolean] as PropType<TdOptionProps['value']>,
3636
},
3737
};

src/select/type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export interface TdOptionProps {
292292
/**
293293
* 选项值
294294
*/
295-
value?: string | number;
295+
value?: string | number | boolean;
296296
}
297297

298298
export interface TdOptionGroupProps {

0 commit comments

Comments
 (0)