fix: Icon styles for inputs are incorrect in Space Compact mode. #42167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
fix: Space Compact 样式问题,对于有图标的Input组合样式没有融合
💡 Background and solution
当Input组件被Space.Compact组件包装,并且使用addonBefore或addonAfter时,样式会出现错误。经过分析,原因是Input组件没有应用正确的类名,例如xxx-compact-item。
如图所示,input组件由于使用了addonBefore/addonAfter,会被包裹一层wrapper,xxx-compact-item添加到了wrapper容器上,导致input的boder-radius没有被正确覆盖。
目前我想到的做法是选中wrapper中含有xxx-compact-item相关的类名,并将其相关子类的样式进行修改,如果有更好的解决方法,请多多指教,谢谢。
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at a5731de
Fix input icon style in Space Compact mode. Adjust border radius of
input
andgroup-addon
elements incomponents/input/style/index.ts
based on their position inSpace
component.🔍 Walkthrough
🤖 Generated by Copilot at a5731de