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