feat(TabbarItem): add badge prop, mark info prop as deprecated
This commit is contained in:
@@ -20,6 +20,7 @@ export default createComponent({
|
||||
icon: String,
|
||||
name: [Number, String],
|
||||
info: [Number, String],
|
||||
badge: [Number, String],
|
||||
iconPrefix: String,
|
||||
},
|
||||
|
||||
@@ -70,7 +71,10 @@ export default createComponent({
|
||||
<div class={bem({ active })} style={{ color }} onClick={this.onClick}>
|
||||
<div class={bem('icon')}>
|
||||
{this.genIcon(active)}
|
||||
<Info dot={this.dot} info={this.info} />
|
||||
<Info
|
||||
dot={this.dot}
|
||||
info={isDef(this.badge) ? this.badge : this.info}
|
||||
/>
|
||||
</div>
|
||||
<div class={bem('text')}>{this.slots('default', { active })}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user