From e6d7951574ff0155bfb42053dadef6957734d164 Mon Sep 17 00:00:00 2001 From: QQ Date: Tue, 3 Nov 2026 14:13:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20=E5=B7=A6=E6=A0=8F=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E6=90=9C=E7=B4=A2=E6=A1=86=E6=96=87=E5=AD=97=E5=8E=8B?= =?UTF-8?q?=E5=9C=A8=E6=94=BE=E5=A4=A7=E9=95=9C=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:搜索框是 Fomantic 的 .ui.fluid.action.left.icon.input,放大镜是绝对定位的 .icon(默认宽 2.671em),官方靠 input 的 padding-left 让位。我们把 padding 覆盖成 0 10px 之后,图标位置不变、文字却顶到最左边,于是叠在一起。 改动: - input padding 改为 0 10px 0 37px(量过:图标右边缘 69px,文字起点 75px) - .ui.input > .icon 宽 30px、透明度 .7 - 附 preview/_reposearch_probe.html,加载线上 index.css 复现该 DOM 并可量尺 样式表 ?v=10 --- custom/public/assets/css/qq-pages.css | 11 +++++- custom/templates/custom/header.tmpl | 6 +-- preview/_reposearch_probe.html | 55 +++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 preview/_reposearch_probe.html diff --git a/custom/public/assets/css/qq-pages.css b/custom/public/assets/css/qq-pages.css index 36c4056..69971b2 100644 --- a/custom/public/assets/css/qq-pages.css +++ b/custom/public/assets/css/qq-pages.css @@ -385,7 +385,10 @@ .qq-dash-repos #dashboard-repo-list input[type="search"] { width: 100%; height: 34px; - padding: 0 10px; + /* 左侧留出图标位:Fomantic 的 .left.icon.input 会把放大镜绝对定位在左边, + 官方默认的内边距是 2.671em,这里覆盖了 padding 就必须自己补回来, + 否则「查找仓库…」会压在放大镜上 */ + padding: 0 10px 0 37px; margin-bottom: 10px; font-size: 13px; border: 1px solid var(--color-input-border, var(--color-secondary)); @@ -394,6 +397,12 @@ color: var(--color-input-text, var(--color-text)); } +.qq-dash-repos #dashboard-repo-list .ui.input > .icon { + width: 30px; + font-size: 14px; + opacity: 0.7; +} + .qq-dash-repos a { font-size: 13px; } diff --git a/custom/templates/custom/header.tmpl b/custom/templates/custom/header.tmpl index d1ca5f4..84291c3 100644 --- a/custom/templates/custom/header.tmpl +++ b/custom/templates/custom/header.tmpl @@ -4,9 +4,9 @@ 注意:只做外观增强,不引入任何外部依赖,全部资源随 custom/ 一起发布 */}} - - - + + + diff --git a/preview/_reposearch_probe.html b/preview/_reposearch_probe.html new file mode 100644 index 0000000..458e593 --- /dev/null +++ b/preview/_reposearch_probe.html @@ -0,0 +1,55 @@ + + + + +左栏仓库搜索框探针 + + + + + + + + +
+
+
+

当前线上样式

+
+
+
+ + + +
+
+
+
+
+
+ +

+
+
+