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-item-padding: 4px 10px !default;
|
||||||
$tab-bar-android-active-border-width: 3px !default;
|
$tab-bar-android-active-border-width: 3px !default;
|
||||||
$tab-bar-android-active-border-color: red !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 {
|
.tabs-android {
|
||||||
|
|
||||||
.tab-bar-item {
|
.tab-bar-item {
|
||||||
padding: $tab-bar-item-padding;
|
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 {
|
.tab-bar .tab-bar-item {
|
||||||
|
@ -4,7 +4,9 @@ import {IonicComponent} from 'ionic2/config/component'
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-tabs',
|
selector: 'ion-tabs',
|
||||||
bind: {
|
bind: {
|
||||||
placement: 'placement'
|
placement: 'placement',
|
||||||
|
tabBarIcons: 'tab-bar-icons',
|
||||||
|
tabBarText: 'tab-bar-text'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@Template({
|
@Template({
|
||||||
@ -17,8 +19,8 @@ import {IonicComponent} from 'ionic2/config/component'
|
|||||||
class="tab-bar-item"
|
class="tab-bar-item"
|
||||||
[class.tab-active]="tab.isSelected"
|
[class.tab-active]="tab.isSelected"
|
||||||
(^click)="onClickTabItem($event, tab)">
|
(^click)="onClickTabItem($event, tab)">
|
||||||
<icon class="tab-bar-item-icon ion-home"></icon>
|
<icon class="tab-bar-item-icon ion-home" [hidden]="tabBarIcons=='none'"></icon>
|
||||||
<span class="tab-bar-item-text">{{tab.title}}</span>
|
<span class="tab-bar-item-text" [hidden]="tabBarText=='none'">{{tab.title}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -78,6 +80,14 @@ new IonicComponent(Tabs, {
|
|||||||
android: 'top',
|
android: 'top',
|
||||||
base: 'bottom'
|
base: 'bottom'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
tabBarIcons: {
|
||||||
|
defaults: {
|
||||||
|
ios: 'top',
|
||||||
|
android: 'none',
|
||||||
|
base: 'top'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tabBarText: {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user