From dbc36cf2335d84559d1439d3ae26608cf054b549 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 29 Dec 2023 11:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tag.js | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) 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; } } `,