From 6f64c3d4af0b3012e9b27912b56c3cfe75ad97ef Mon Sep 17 00:00:00 2001 From: wangyu <823267011@qq.com> Date: Thu, 11 Jun 2026 10:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B1=80=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=AF=BC=E8=87=B4=E8=BE=93=E5=85=A5=E6=A1=86=E6=96=87?= =?UTF-8?q?=E5=AD=97=E4=B8=8E=E5=9B=BE=E6=A0=87=E9=87=8D=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit index.scss 全局压高度规则把 .el-input__inner 的 padding 写死为 0 8px !important, 覆盖了 element-ui 给带前/后缀图标输入框预留的 30px 内边距,导致日期选择器、 带搜索图标输入框、下拉选择等的占位文字/内容压在图标上。 在该规则后补回更高优先级的图标位 padding(prefix/suffix 各 28px), 并修正 mini 尺寸输入框图标行高(22px,原 26px 垂直偏移)。 Co-Authored-By: Claude Fable 5 --- ruoyi-ui/src/assets/styles/index.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-ui/src/assets/styles/index.scss b/ruoyi-ui/src/assets/styles/index.scss index 341ad29..2f078b1 100644 --- a/ruoyi-ui/src/assets/styles/index.scss +++ b/ruoyi-ui/src/assets/styles/index.scss @@ -65,6 +65,11 @@ body { .el-range-editor .el-range-separator { line-height: 24px !important; font-size: 12px !important; } .el-input__icon { line-height: 26px !important; } .el-input__suffix-inner .el-input__icon { line-height: 26px !important; } +/* 上面的 padding: 0 8px !important 会盖掉 element 给带图标输入框预留的 30px, + 导致占位文字/内容压在前后缀图标上(如日期选择器、带搜索图标的输入框),这里补回图标位 */ +.el-input--prefix .el-input__inner { padding-left: 28px !important; } +.el-input--suffix .el-input__inner { padding-right: 28px !important; } +.el-input--mini .el-input__icon { line-height: 22px !important; } .el-form-item__content { line-height: 26px; } /* 按钮:默认 26px 高,mini 22px,medium 28px */