fix(dialog): restrict header icon style to direct children #2203
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.
🤔 这个 PR 的性质是?
🔗 相关 Issue
N/A(样式问题,未记录 Issue,可视为内部样式修复)
💡 需求背景和解决方案
当前
<t-dialog>
的.t-dialog__header
中,样式选择器:作用范围过大,会影响
header
插槽中用户自定义组件(如<t-breadcrumb>
、<t-button>
)内的.t-icon
,造成图标尺寸和样式异常。✅ 修改方案
将选择器修改为仅匹配 直系子元素:
🎯 修改效果
.t-dialog__header
中深层.t-icon
被放大的副作用(少见),此改动会使其恢复正常。效果截图对比(前 / 后)
❌ 修改前(嵌套组件 icon 被误伤)
✅ 修改后(嵌套组件样式恢复正常)
✅ header 中直系 icon 样式仍保留(视觉不变)
📝 更新日志
fix(dialog): 限制 header icon 样式为直系子元素,避免误伤插槽嵌套组件的图标
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单