|
28 | 28 |
|
29 | 29 | <!-- The number of MDTabContentItem components should corespond to the number of MDTabStripItem components -->
|
30 | 30 | <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')"> |
32 | 32 | <Page backgroundColor="transparent">
|
33 |
| - <GridLayout backgroundColor="transparent" @loaded="onLoaded('red')"> |
| 33 | + <GridLayout backgroundColor="transparent"> |
34 | 34 | <Label text="First Page" class="h2 text-center" @tap="navigateToTabsSample"></Label>
|
35 | 35 | <Button text="show alert" @tap="showTestAlert" verticalAlignment="center"></Button>
|
36 | 36 | </GridLayout>
|
37 | 37 | </Page>
|
38 | 38 | </Frame>
|
39 | 39 | </MDTabContentItem>
|
40 | 40 | <MDTabContentItem>
|
41 |
| - <GridLayout backgroundColor="transparent" @loaded="onLoaded('green')"> |
| 41 | + <GridLayout backgroundColor="transparent" @loaded="onLoaded('second')" @unloaded="onUnloaded('second')" @selected="onSelected('second')" @unselected="onUnselected('second')"> |
42 | 42 | <Label text="Second Page" class="h2 text-center"></Label>
|
43 | 43 | </GridLayout>
|
44 | 44 | </MDTabContentItem>
|
45 | 45 | <MDTabContentItem>
|
46 |
| - <GridLayout backgroundColor="yellow" @loaded="onLoaded('yellow')"> |
| 46 | + <GridLayout backgroundColor="yellow" @loaded="onLoaded('third')" @unloaded="onUnloaded('third')" @selected="onSelected('third')" @unselected="onUnselected('third')"> |
47 | 47 | <Label text="Third Page" class="h2 text-center"></Label>
|
48 | 48 | </GridLayout>
|
49 | 49 | </MDTabContentItem>
|
50 | 50 | <MDTabContentItem>
|
51 |
| - <Frame id="test2"> |
| 51 | + <Frame id="test2" @loaded="onLoaded('fourth')" @unloaded="onUnloaded('fourth')" @selected="onSelected('fourth')" @unselected="onUnselected('fourth')"> |
52 | 52 | <Page>
|
53 |
| - <GridLayout backgroundColor="transparent" @loaded="onLoaded('red')"> |
| 53 | + <GridLayout backgroundColor="transparent"> |
54 | 54 | <Label text="Fourth Page" class="h2 text-center" @tap="navigateToTabsSample"></Label>
|
55 | 55 | <Button text="show alert" @tap="showTestAlert" verticalAlignment="center"></Button>
|
56 | 56 | </GridLayout>
|
@@ -85,6 +85,15 @@ export default Vue.extend({
|
85 | 85 | onLoaded(name) {
|
86 | 86 | console.log('BN onTabLoaded', name);
|
87 | 87 | },
|
| 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 | + }, |
88 | 97 | navigateToTabsSample() {
|
89 | 98 | this.$navigateTo(Tabs);
|
90 | 99 | },
|
|
0 commit comments