ant-design / ant-design/pro-components
🐛[BUG] 使用StepsForm - 分步表单,将每一步封装成一个组件,传入的参数后将传入的参数自动到form元素下导致控制台出现错误问题
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🐛 bug 描述
使用StepsForm - 分步表单,将每一步封装成一个组件,传入的参数后将传入的参数自动到form元素下导致控制台出现错误问题
### 📷 复现步骤
直接通过控制台查看stepForm的form元素, 就会发现被自动注入了传入的参数, 并且会出现以下的报错
### 🏞 期望结果
希望传入的参数不在自动注入form元素下
### 💻 复现代码
const ContractModuleStepForm: FC<{ chinaRegionId: string }> = () => {
return (
)
}
function IndexView() {
return (
<>
)
### © 版本信息
- ProComponents 版本: 2.6.43
- umi 版本
- 浏览器环境 chrome 126.0.6478.63
- 开发环境 web
### 🚑 其他信息


Contributor guide
Research direction
Start by reproducing the issue with StepsForm and the ContractModuleStepForm example, then inspect the StepsForm.StepForm entry point to trace how wrapper props reach the form element. Done means the chinaRegionId prop no longer appears on the rendered form and the console error is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100