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') {