Skip to content

Commit c251bc4

Browse files
committed
demo(vue): update
1 parent 3a698d9 commit c251bc4

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

demo-snippets/vue/BottomNavigation.vue

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@
2828

2929
<!-- The number of MDTabContentItem components should corespond to the number of MDTabStripItem components -->
3030
<MDTabContentItem>
31-
<Frame id="test" backgroundColor="transparent">
31+
<Frame id="test" backgroundColor="transparent" @loaded="onLoaded('first')" @unloaded="onUnloaded('first')" @selected="onSelected('first')" @unselected="onUnselected('first')">
3232
<Page backgroundColor="transparent">
33-
<GridLayout backgroundColor="transparent" @loaded="onLoaded('red')">
33+
<GridLayout backgroundColor="transparent">
3434
<Label text="First Page" class="h2 text-center" @tap="navigateToTabsSample"></Label>
3535
<Button text="show alert" @tap="showTestAlert" verticalAlignment="center"></Button>
3636
</GridLayout>
3737
</Page>
3838
</Frame>
3939
</MDTabContentItem>
4040
<MDTabContentItem>
41-
<GridLayout backgroundColor="transparent" @loaded="onLoaded('green')">
41+
<GridLayout backgroundColor="transparent" @loaded="onLoaded('second')" @unloaded="onUnloaded('second')" @selected="onSelected('second')" @unselected="onUnselected('second')">
4242
<Label text="Second Page" class="h2 text-center"></Label>
4343
</GridLayout>
4444
</MDTabContentItem>
4545
<MDTabContentItem>
46-
<GridLayout backgroundColor="yellow" @loaded="onLoaded('yellow')">
46+
<GridLayout backgroundColor="yellow" @loaded="onLoaded('third')" @unloaded="onUnloaded('third')" @selected="onSelected('third')" @unselected="onUnselected('third')">
4747
<Label text="Third Page" class="h2 text-center"></Label>
4848
</GridLayout>
4949
</MDTabContentItem>
5050
<MDTabContentItem>
51-
<Frame id="test2">
51+
<Frame id="test2" @loaded="onLoaded('fourth')" @unloaded="onUnloaded('fourth')" @selected="onSelected('fourth')" @unselected="onUnselected('fourth')">
5252
<Page>
53-
<GridLayout backgroundColor="transparent" @loaded="onLoaded('red')">
53+
<GridLayout backgroundColor="transparent">
5454
<Label text="Fourth Page" class="h2 text-center" @tap="navigateToTabsSample"></Label>
5555
<Button text="show alert" @tap="showTestAlert" verticalAlignment="center"></Button>
5656
</GridLayout>
@@ -85,6 +85,15 @@ export default Vue.extend({
8585
onLoaded(name) {
8686
console.log('BN onTabLoaded', name);
8787
},
88+
onUnloaded(name) {
89+
console.log('BN onTabUnloaded', name);
90+
},
91+
onSelected(name) {
92+
console.log('BN onSelected', name);
93+
},
94+
onUnselected(name) {
95+
console.log('BN onUnselected', name);
96+
},
8897
navigateToTabsSample() {
8998
this.$navigateTo(Tabs);
9099
},

0 commit comments

Comments
 (0)