Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic form 表单字段显示 #3838

Open
4 tasks done
johnsnow20087349 opened this issue May 13, 2024 · 0 comments
Open
4 tasks done

basic form 表单字段显示 #3838

johnsnow20087349 opened this issue May 13, 2024 · 0 comments

Comments

@johnsnow20087349
Copy link

johnsnow20087349 commented May 13, 2024

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

在使用basic form 的时候,如果字段的名称是length,那么在对名为length 的InputInputNumber进行赋值的时候,回显数据就会变成该输入值的长度。

复现 Bug

  1. 定义表单项
const schemas: FormSchema[] = [
    {
      field: 'length',
      component: 'Input',
      label: '接口名称',
      colProps: {
        span: 8,
      },
    },
  ];
const [registerForm, formMethods] = useForm({schemas});

2.对该表单项进行赋值

formMethods.setFieldsValue({length: '123456'});

3.结果显示
image

系统信息

  • 操作系统: win11
  • Node 版本: 18.20.2
  • pnpm 版本: 9.0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant