|
@@ -143,6 +143,13 @@
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: true
|
|
default: true
|
|
|
},
|
|
},
|
|
|
|
|
+ // tab item的样式
|
|
|
|
|
+ itemStyle: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ default() {
|
|
|
|
|
+ return {}
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 当前活动tab item的样式
|
|
// 当前活动tab item的样式
|
|
|
activeItemStyle: {
|
|
activeItemStyle: {
|
|
|
type: Object,
|
|
type: Object,
|
|
@@ -254,9 +261,10 @@
|
|
|
if (index == this.currentIndex) {
|
|
if (index == this.currentIndex) {
|
|
|
style.color = this.activeColor;
|
|
style.color = this.activeColor;
|
|
|
// 给选中的tab item添加外部自定义的样式
|
|
// 给选中的tab item添加外部自定义的样式
|
|
|
- style = Object.assign(style, this.activeItemStyle);
|
|
|
|
|
|
|
+ style = Object.assign(style, this.itemStyle, this.activeItemStyle, { color: this.activeColor });
|
|
|
} else {
|
|
} else {
|
|
|
style.color = this.inactiveColor;
|
|
style.color = this.inactiveColor;
|
|
|
|
|
+ style = Object.assign(style, this.itemStyle);
|
|
|
}
|
|
}
|
|
|
return style;
|
|
return style;
|
|
|
}
|
|
}
|