feat(Cascader): support active-color prop

This commit is contained in:
chenjiahan 2020-12-20 14:00:33 +08:00 committed by neverland
parent 5d2bd8f6df
commit 3f429142ac
2 changed files with 8 additions and 2 deletions

View File

@ -108,6 +108,7 @@ export default createComponent({
return ( return (
<li <li
class={bem('option', { selected: isSelected })} class={bem('option', { selected: isSelected })}
style={{ color: isSelected ? this.activeColor : null }}
onClick={() => { onClick={() => {
this.onSelect(option, tabIndex); this.onSelect(option, tabIndex);
}} }}
@ -125,7 +126,13 @@ export default createComponent({
renderTabs() { renderTabs() {
return ( return (
<Tabs vModel={this.activeTab} animated swipeable class={bem('tabs')}> <Tabs
vModel={this.activeTab}
animated
swipeable
class={bem('tabs')}
color={this.activeColor}
>
{this.tabs.map((item, tabIndex) => ( {this.tabs.map((item, tabIndex) => (
<Tab <Tab
title={item.title} title={item.title}

View File

@ -59,7 +59,6 @@
} }
&__selected-icon { &__selected-icon {
color: @red;
font-size: 18px; font-size: 18px;
} }