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, .label {
f: 12px height: 24px;
), font-size: 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='#{$s}'][circle]) { .icon {
width: map.get($v, 'h'); --wc-icon-size: 12px;
height: map.get($v, 'h');
} }
} }
` `