Skip to content

Commit d980c43

Browse files
committed
demo(vue): update
1 parent 77ccc57 commit d980c43

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

demo-snippets/vue/BottomNavigation.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<NavigationButton text="Back" android.systemIcon="ic_menu_back" @tap="onNavigationButtonTap" />
55
</ActionBar>
66

7-
<GridLayout rows="*, 20" backgroundColor="red">
7+
<GridLayout rows="*, 0" backgroundColor="red">
88
<MDBottomNavigation selectedIndex="1" :iosCustomPositioning="true">
99
<!-- The bottom tab UI is created via MDTabStrip (the containier) and MDTabStripItem (for each tab)-->
1010
<MDTabStrip>
@@ -65,7 +65,7 @@ export default Vue.extend({
6565
},
6666
methods: {
6767
onNavigationButtonTap() {
68-
frameModule.Frame.topmost().goBack();
68+
this.$navigateBack();
6969
},
7070
onLoaded(name) {
7171
console.log('BN onTabLoaded', name);

demo-snippets/vue/Tabs.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ActionBar :title="title">
44
<NavigationButton text="Back" android.systemIcon="ic_menu_back" @tap="onNavigationButtonTap" />
55
</ActionBar>
6-
<GridLayout rows="*, 20" backgroundColor="red">
6+
<GridLayout rows="*, 0" backgroundColor="red">
77
<MDTabs ref="tabs" :iosCustomPositioning="true" :unloadOnTabChange="false" backgroundColor="green">
88
<!-- The bottom tab UI is created via MDTabStrip (the containier) and MDTabStripItem (for each tab)-->
99
<MDTabStrip>
@@ -23,7 +23,7 @@
2323

2424
<!-- The number of MDTabContentItem components should corespond to the number of MDTabStripItem components -->
2525
<MDTabContentItem>
26-
<Frame>
26+
<Frame id="inner">
2727
<Page>
2828
<GridLayout backgroundColor="red" @loaded="onLoaded('red')">
2929
<Label text="Home Page" class="h2 text-center"></Label>
@@ -42,7 +42,7 @@
4242
</template>
4343

4444
<script lang="ts">
45-
import * as frameModule from '@nativescript/core/ui/frame';
45+
import { Frame } from '@nativescript/core/ui/frame';
4646
import { TabContentItem, Tabs } from '@nativescript-community/ui-material-tabs/';
4747
import { Color, EventData, GridLayout, Label, StackLayout } from '@nativescript/core';
4848
@@ -60,7 +60,7 @@ export default Vue.extend({
6060
},
6161
methods: {
6262
onNavigationButtonTap() {
63-
frameModule.Frame.topmost().goBack();
63+
this.$navigateBack();
6464
},
6565
6666
onLoaded(name) {

0 commit comments

Comments
 (0)