[new feature] Tag: add text-color prop (#2277)
This commit is contained in:
@@ -33,14 +33,21 @@ export default create({
|
||||
mark: Boolean,
|
||||
color: String,
|
||||
plain: Boolean,
|
||||
round: Boolean
|
||||
round: Boolean,
|
||||
textColor: String
|
||||
},
|
||||
|
||||
computed: {
|
||||
style() {
|
||||
const color = this.color || COLOR_MAP[this.type] || GRAY_DARK;
|
||||
const key = this.plain ? 'color' : 'backgroundColor';
|
||||
return { [key]: color };
|
||||
const style = { [key]: color };
|
||||
|
||||
if (this.textColor) {
|
||||
style.color = this.textColor;
|
||||
}
|
||||
|
||||
return style;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user