-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
@cieme
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
undefined
Environment
window10 vue@latest chrome@latest ant-design-vu@4.2.6
Reproduction link
Steps to reproduce
const value = ref<null | number>(null)
Type 'number | null' is not assignable to type 'ValueType | undefined'.
Type 'null' is not assignable to type 'ValueType | undefined'.
What is expected?
The props attribute value of a-input-number is of type ValueType is string | number. A null should be added.
期望类型增加 null ,因为 backsapce or delete 删除后 value is null ,但是他不在类型之内,会导致ts 报错
What is actually happening?
a-input-number value 的当前类型为 string | number ,但是 当你点击 backsapce or delete 清空输入框,他的有效值为 null,所以应该增加一个 null 类型, 但是他不在类型之内,会导致ts 报错
Metadata
Metadata
Assignees
Labels
No labels