ant-design / ant-design/pro-components

🐛 [BUG] 把StepsForm.StepForm包一层里面的渲染逻辑会被覆盖

Open
#9,021 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述

![Image](https://github.com/user-attachments/assets/1c5ecf99-beaa-440f-9bad-e13e81169d64)

![Image](https://github.com/user-attachments/assets/f1b97312-8281-4fbb-a211-1be63b584323)

![Image](https://github.com/user-attachments/assets/5012c0e2-af36-44ae-8120-5c1f0a61e008)

截图可以看到
在 `StepForm` 那层的 `children` 是对的
但是到了 `BaseForm` 的 `children` 直接被覆盖了

我有在 `StepsForm.Step` 包了一层,`AUIProStepsFormStep` 会有自己的渲染逻辑,
但是直接被覆盖了
更神奇的是我没把 `title` 传给 `StepsForm.StepForm` 也会自动渲染

### 📷 复现步骤

https://codesandbox.io/p/sandbox/proform-example-forked-stppy3

### 🏞 期望结果

保留 `StepsFormStepWrapper` 的渲染逻辑

### 💻 复现代码

### © 版本信息

- ProComponents 版本: 2.8.6
- 浏览器环境: Chromium Engine Version 133.0.6943.35
- 开发环境: macOS

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and trace how children pass from StepsForm.StepForm into BaseForm. Confirm where the StepsFormStepWrapper rendering logic is replaced, then verify that the wrapper's rendering is preserved without the unexpected automatic title rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.