修复全局样式导致输入框文字与图标重叠
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user