Skip to content

Commit 67086ca

Browse files
authored
Merge pull request #148 from eugenevdm/master
Improve Vue sample and fix typo in Angular sample
2 parents e213c98 + f9d3485 commit 67086ca

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<GridLayout class="p-20">
2-
<Label class="h1 text-center" text="Thrid tab" textWrap="true"></Label>
2+
<Label class="h1 text-center" text="Third tab" textWrap="true"></Label>
33
</GridLayout>

demo-vue/app/examples/BottomNavigationBar.vue

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
</ActionBar>
66
<GridLayout rows="*, auto" backgroundColor="blue">
77
<StackLayout class="page" backgroundColor="white" row="0">
8-
<!-- <ns-first-tab *ngSwitchDefault></ns-first-tab> -->
9-
<!-- <ns-third-tab *ngSwitchCase="2"></ns-third-tab> -->
8+
<GridLayout class="p-20" v-if="currentTab === 0"> -->
9+
<Label class="h1 text-center" text="First tab" textWrap="true"></Label>
10+
</GridLayout> -->
11+
<GridLayout class="p-20" v-if="currentTab === 2">
12+
<Label class="h1 text-center" text="Third tab" textWrap="true"></Label>
13+
</GridLayout>
1014
</StackLayout>
1115
<MDBottomNavigationBar
1216
row="1"
@@ -37,7 +41,8 @@ export default Vue.extend({
3741
name: 'BottomNavigationBar',
3842
data() {
3943
return {
40-
title: title
44+
title: title,
45+
currentTab: 0
4146
};
4247
},
4348
methods: {
@@ -58,6 +63,7 @@ export default Vue.extend({
5863
onBottomNavigationTabSelected(args: TabSelectedEventData): void {
5964
console.log(`old tab index: ${args.oldIndex}`);
6065
console.log(`selected tab index: ${args.newIndex}`);
66+
this.currentTab = args.newIndex;
6167
},
6268
6369
onBottomNavigationTabReselected(args: TabReselectedEventData): void {

0 commit comments

Comments
 (0)