Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The props attribute value of a-input-number is of type ValueType is string | number. A null should be added. #8297

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

https://github.com/

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /