Skip to content

FormItem name type definition error in dynamic form #4998

Closed
@CZDonald

Description

@CZDonald
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-alpha.14

Environment

vue 3.2.20 Chrome 96.0.4664.45 windows 11

Reproduction link

https://p3-tt.byteimg.com/origin/user-profile/3aafd8ce147a6455819297c0475de879.png

Steps to reproduce

vscode 中 使用TSX map动态渲染表单 FormItm组件
<FormItem
name={['formData', index, 'input_value']}
label={item.name}
rules={{ required: item.required, message: item.describe }}

What is expected?

FormItem name类型检测通过

FormItem name类型定义是否应该是string | number | Array<number | string>

What is actually happening?

vscode 提示name参数 不能将类型“string”分配给类型“number”。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions