Repository navigation
fix(client): hide empty status tooltip popper to remove stray arrow artifact - #373
Merged
Merged
Conversation
Oppenheymu
force-pushed
the
fix/status-tooltip-empty-arrow
branch
from
September 19, 2026 15:42
4da2182 to
39c07d0
Compare
shigma
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #372
问题:状态栏状态项没有 tooltip 内容时(如未配置任何机器人时悬停「↑ 0/min ↓ 0/min」),空弹层的
.el-popper__arrow会残留为一枚黑色菱形,详见 #372。根因:空占位标记
<span class="el-popper__empty">嵌在el-scrollbar内层,而 Element Plus 把箭头 span 渲染为#content插槽输出的平级后继(对照element-plus@2.7.7的packages/components/tooltip/src/tooltip.vue,showArrow默认开启),二者不是相邻兄弟节点,原有的相邻选择器.el-popper__empty + .el-popper__arrow永远匹配不上——空弹层本体因零尺寸不可见,可见的就只剩那枚箭头。修复:改用
:has(.el-popper__empty)在无内容时整体隐藏弹层。零尺寸弹体(padding: 0 0)本就不可见,整体隐藏与原意图等价且更彻底。凡未传#tooltip插槽的<k-status>使用方(加载进度、插件市场下载进度等)一并受益。已在本地实测:修复前悬停空状态项出现黑菱形;修复后消失,且不改变有内容 tooltip(版本信息、系统负载)的弹出表现。
:has()为 Baseline 特性(Chrome 105+ / Safari 15.4+ / Firefox 121+)。