ant-design / ant-design/pro-components

🐛[BUG] ⚠️`LoginForm` 的 `subTitle` 的颜色在开启 `cssVar` 功能时,在算法切换过后就回不来了

Open
#8,077 4 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 描述

如题,非常简洁明了的BUG

我不知道是procomponents的问题还是5.0 cssVar的问题。 因为我刚才提交了一个cssVar的Bug🤣 但这个问题我只在LoginForm里出现了我就提到这来了。

反正 `cssVar` 开启之后, 没切换算法前一切正常:
![image](https://github.com/ant-design/pro-components/assets/45784210/2bee33ed-2ab0-4b04-88ca-b9e0abf0d156)
切换之后就会多出一个类名:
![image](https://github.com/ant-design/pro-components/assets/45784210/05d91d7f-94ac-4d22-bff9-10674668375d)
然后再怎么切这个类名也不会消失了,颜色就回不去了。

没有开启 `cssVar` 时, 切换之后这个多出来的类名会消失。 我感觉是这里的问题

我甚至不知道这个和antd是不是一个团队🤣 求告知

### 📷 复现步骤

单击按钮切换算法
https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-rdppc6?file=%2Findex.js%3A20%2C26

CodeSandbox慢死了。。 我得在stackblitz建个自己的模板

### 🏞 期望结果

颜色应该会回来

### 💻 复现代码

如上

### © 版本信息

- ProComponents 版本: 2.6.43
- umi 版本: N/A
- 浏览器环境: Chrome 120
- 开发环境 Windows 11

Contributor guide

Open the contributing guide

Research direction

Start with the CodeSandbox reproduction, particularly index.js around lines 20–26, and reproduce the LoginForm behavior with cssVar enabled. Inspect the LoginForm implementation and the algorithm-switch path to trace the extra class name. Done means the subtitle color returns after switching algorithms, matching behavior with cssVar disabled.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.