mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
refactor(tab): rename tab properties
This commit is contained in:
@ -51,11 +51,11 @@ export class TabButton {
|
||||
hostData() {
|
||||
const selected = this.selected;
|
||||
const tab = this.tab;
|
||||
const hasTitle = !!tab.title;
|
||||
const hasIcon = !!tab.icon;
|
||||
const hasTitle = !!tab.tabTitle;
|
||||
const hasIcon = !!tab.tabIcon;
|
||||
const hasTitleOnly = (hasTitle && !hasIcon);
|
||||
const hasIconOnly = (hasIcon && !hasTitle);
|
||||
const hasBadge = !!tab.badge;
|
||||
const hasBadge = !!tab.tabBadge;
|
||||
return {
|
||||
'role': 'tab',
|
||||
'id': tab.btnId,
|
||||
@ -84,9 +84,9 @@ export class TabButton {
|
||||
class='tab-cover'
|
||||
onKeyUp={this.onKeyUp.bind(this)}
|
||||
onBlur={this.onBlur.bind(this)}>
|
||||
{ tab.icon && <ion-icon class='tab-button-icon' name={tab.icon}></ion-icon> }
|
||||
{ tab.title && <span class='tab-button-text'>{tab.title}</span> }
|
||||
{ tab.badge && <ion-badge class='tab-badge' color={tab.badgeStyle}>{tab.badge}</ion-badge> }
|
||||
{ tab.tabIcon && <ion-icon class='tab-button-icon' name={tab.tabIcon}></ion-icon> }
|
||||
{ tab.tabTitle && <span class='tab-button-text'>{tab.tabTitle}</span> }
|
||||
{ tab.tabBadge && <ion-badge class='tab-badge' color={tab.tabBadgeStyle}>{tab.tabBadge}</ion-badge> }
|
||||
{ this.mode === 'md' && <ion-ripple-effect useTapClick={true}/> }
|
||||
</a>
|
||||
];
|
||||
|
Reference in New Issue
Block a user