diff --git a/src/views/tag.js b/src/views/tag.js index b2ec5dd..22263dd 100644 --- a/src/views/tag.js +++ b/src/views/tag.js @@ -24,8 +24,8 @@ class Tag extends Component { display: flex; align-items: center; width: auto; - height: 32px; - padding: 0 10px; + height: var(--wc-tag-height, 32px); + padding: var(--wc-tag-padding, 0 10px); gap: 3px; font-size: var(--wc-tag-font, 12px); border: 1px solid var(--wc-tag-border-color, var(--color-grey-1)); @@ -51,24 +51,10 @@ class Tag extends Component { `, //尺寸 css` - @use 'sass:map'; - $sizes: ( - s: ( - h: 20px, - p: 0 6px - ), - m: ( - h: 24px, - p: 0 8px - ) - ); - - @loop $s, $v in $sizes { - :host([size='#{$s}']) { - .container { - height: map.get($v, 'h'); - padding: map.get($v, 'p'); - } + :host([size='small']) { + .container { + height: 24px; + padding: 0 8px; } } `,