refactor: 支持改变字典颜色

This commit is contained in:
caiyuchao
2025-08-01 18:15:43 +08:00
parent 4c32fa05ee
commit 2c0601a46b
8 changed files with 128 additions and 24 deletions

View File

@@ -19,6 +19,7 @@ interface DictTagGroupProps {
* 图标
*/
icon?: string;
color?: string;
}
const props = defineProps<DictTagGroupProps>();
@@ -60,6 +61,9 @@ const dictTag = computed(() => {
}
}
}
if (props.color) {
colorType = props.color;
}
dictTagGroup.push({
label: dict.label || '',
colorType,