From 3c8ff3aecee943cccdff698faaa90012e5aac7e2 Mon Sep 17 00:00:00 2001 From: kouchao <1396726559@qq.com> Date: Tue, 15 Feb 2022 16:00:32 +0800 Subject: [PATCH] fix(components): [el-input] missing margin between two icons (#5942) (#6017) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 寇超 --- packages/components/input/src/input.vue | 2 +- packages/theme-chalk/src/input.scss | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/components/input/src/input.vue b/packages/components/input/src/input.vue index 97f77fed77..f48fbc05a7 100644 --- a/packages/components/input/src/input.vue +++ b/packages/components/input/src/input.vue @@ -13,7 +13,7 @@ [nsInput.m('prefix')]: $slots.prefix || prefixIcon, [nsInput.m('suffix')]: $slots.suffix || suffixIcon || clearable || showPassword, - [nsInput.m('suffix--password-clear')]: clearable && showPassword, + [nsInput.m('suffix--password-clear')]: showClear && showPwdVisible, }, $attrs.class, ]" diff --git a/packages/theme-chalk/src/input.scss b/packages/theme-chalk/src/input.scss index 66ddec5bb1..17418bd1ef 100644 --- a/packages/theme-chalk/src/input.scss +++ b/packages/theme-chalk/src/input.scss @@ -106,6 +106,7 @@ font-size: map.get($input-font-size, 'default'); cursor: pointer; transition: var(--el-transition-color); + margin-left: 8px; &:hover { color: var(--el-input-clear-hover-color); @@ -262,15 +263,15 @@ ); @include m(suffix) { + .#{$namespace}-input__inner { + padding-right: $input-padding-size-with-extra-icon; + } + @include m(password-clear) { .#{$namespace}-input__inner { padding-right: 55px; } } - - .#{$namespace}-input__inner { - padding-right: $input-padding-size-with-extra-icon; - } } @include m(prefix) {