[new feature] Tabbar: add inactive-color prop

This commit is contained in:
陈嘉涵
2019-05-05 11:34:22 +08:00
parent fc344d672c
commit 4d8d482e04
7 changed files with 30 additions and 7 deletions
+2 -2
View File
@@ -37,10 +37,10 @@ export default sfc({
render(h) {
const { icon, slots, active } = this;
const style = active ? { color: this.$parent.activeColor } : null;
const color = this.$parent[active ? 'activeColor' : 'inactiveColor'];
return (
<div class={bem({ active })} style={style} onClick={this.onClick}>
<div class={bem({ active })} style={{ color }} onClick={this.onClick}>
<div class={bem('icon', { dot: this.dot })}>
{slots('icon', { active }) || (icon && <Icon name={icon} />)}
<Info info={this.info} />