feat: 按钮组件可指定 icon 颜色

This commit is contained in:
苟川东 2025-04-15 09:28:42 +08:00
parent f1320b0221
commit 59a4a261bb

View File

@ -89,6 +89,12 @@ const props = defineProps({
type: String,
required: false,
default: '#FFFFFF',
},
//icon
customIconColor: {
type: String,
required: false,
default: '',
}
});
@ -102,6 +108,10 @@ const btnBgColor = computed(() => {
// icon
const iconColor = computed(() => {
if (props.customIconColor) {
return props.customIconColor
}
if (!props.isActive) {
return 'var(--descriptionColor)'
}