master
yutent 2024-01-15 15:18:37 +08:00
parent dbc36cf233
commit 72f42773a3
1 changed files with 9 additions and 36 deletions

View File

@ -169,43 +169,16 @@ class Input extends Component {
`, `,
//尺寸 //尺寸
css` css`
@use 'sass:map'; :host([size='small']) {
$sizes: ( min-width: 128px;
m: ( height: 24px;
w: 128px, font-size: 12px;
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 { .label {
height: map.get($v, 'h'); height: 24px;
font-size: map.get($v, 'f'); font-size: 12px;
} }
.icon { .icon {
--wc-icon-size: #{map.get($v, 'f')}; --wc-icon-size: 12px;
}
}
:host([size='#{$s}'][circle]) {
width: map.get($v, 'h');
height: map.get($v, 'h');
} }
} }
` `