mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
tabBarIcons config
This commit is contained in:
@ -5,12 +5,16 @@
|
||||
$tab-bar-android-item-padding: 4px 10px !default;
|
||||
$tab-bar-android-active-border-width: 3px !default;
|
||||
$tab-bar-android-active-border-color: red !default;
|
||||
$tab-bar-android-text-transform: uppercase !default;
|
||||
$tab-bar-android-text-font-weight: 500 !default;
|
||||
|
||||
|
||||
.tabs-android {
|
||||
|
||||
.tab-bar-item {
|
||||
padding: $tab-bar-item-padding;
|
||||
text-transform: $tab-bar-android-text-transform;
|
||||
font-weight: $tab-bar-android-text-font-weight;
|
||||
}
|
||||
|
||||
.tab-bar .tab-bar-item {
|
||||
|
@ -4,7 +4,9 @@ import {IonicComponent} from 'ionic2/config/component'
|
||||
@Component({
|
||||
selector: 'ion-tabs',
|
||||
bind: {
|
||||
placement: 'placement'
|
||||
placement: 'placement',
|
||||
tabBarIcons: 'tab-bar-icons',
|
||||
tabBarText: 'tab-bar-text'
|
||||
}
|
||||
})
|
||||
@Template({
|
||||
@ -17,8 +19,8 @@ import {IonicComponent} from 'ionic2/config/component'
|
||||
class="tab-bar-item"
|
||||
[class.tab-active]="tab.isSelected"
|
||||
(^click)="onClickTabItem($event, tab)">
|
||||
<icon class="tab-bar-item-icon ion-home"></icon>
|
||||
<span class="tab-bar-item-text">{{tab.title}}</span>
|
||||
<icon class="tab-bar-item-icon ion-home" [hidden]="tabBarIcons=='none'"></icon>
|
||||
<span class="tab-bar-item-text" [hidden]="tabBarText=='none'">{{tab.title}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -78,6 +80,14 @@ new IonicComponent(Tabs, {
|
||||
android: 'top',
|
||||
base: 'bottom'
|
||||
}
|
||||
}
|
||||
},
|
||||
tabBarIcons: {
|
||||
defaults: {
|
||||
ios: 'top',
|
||||
android: 'none',
|
||||
base: 'top'
|
||||
}
|
||||
},
|
||||
tabBarText: {}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user