From 72f42773a3c2908ca20e02b0e69f595ae89a7bc8 Mon Sep 17 00:00:00 2001 From: yutent Date: Mon, 15 Jan 2024 15:18:37 +0800 Subject: [PATCH] update --- src/form/input.js | 45 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 36 deletions(-) diff --git a/src/form/input.js b/src/form/input.js index 5525b93..fa82bdb 100644 --- a/src/form/input.js +++ b/src/form/input.js @@ -169,43 +169,16 @@ class Input extends Component { `, //尺寸 css` - @use 'sass:map'; - $sizes: ( - m: ( - w: 128px, - h: 24px, - f: 12px - ), - // l default - xl: - ( - w: 224px, - h: 36px, - f: 14px - ), - xxl: ( - w: 288px, - h: 44px, - f: 14px - ) - ); - - @loop $s, $v in $sizes { - :host([size='#{$s}']) { - min-width: map.get($v, 'w'); - height: map.get($v, 'h'); - font-size: map.get($v, 'f'); - .label { - height: map.get($v, 'h'); - font-size: map.get($v, 'f'); - } - .icon { - --wc-icon-size: #{map.get($v, 'f')}; - } + :host([size='small']) { + min-width: 128px; + height: 24px; + font-size: 12px; + .label { + height: 24px; + font-size: 12px; } - :host([size='#{$s}'][circle]) { - width: map.get($v, 'h'); - height: map.get($v, 'h'); + .icon { + --wc-icon-size: 12px; } } `