From b5eb9e73a7bbd2875961e4dc5972442e6b32a7b3 Mon Sep 17 00:00:00 2001 From: GoldenZqqqq <1361001127@qq.com> Date: Sun, 4 Aug 2024 12:14:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20DictTag=E7=BB=84=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0props=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=AF=8F=E4=B8=AAtag=E4=B9=8B=E9=97=B4=E7=9A=84=E9=97=B4?= =?UTF-8?q?=E9=9A=94=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=BA5px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/src/DictTag.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index 93e15053..b82b97c3 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -20,6 +20,11 @@ export default defineComponent({ sepSymbol: { type: String as PropType, default: ',' + }, + // 每个tag之间的间隔,默认为5px + tagSpacing: { + type: String as PropType, + default: '5px' } }, setup(props) { @@ -49,7 +54,15 @@ export default defineComponent({ const dictOptions = getDictOptions(props.type) return ( -
+
{dictOptions.map((dict: DictDataType) => { if (valueArr.value.includes(dict.value)) { if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'default') {