11<template >
22 <Page >
3+
34 <ActionBar :title =" title" >
4- <NavigationButton text =" Back" android.systemIcon =" ic_menu_back" @tap =" onNavigationButtonTap" ></ NavigationButton >
5+ <NavigationButton text =" Back" android.systemIcon =" ic_menu_back" @tap =" onNavigationButtonTap" / >
56 </ActionBar >
6- <StackLayout >
7- <MDButton id =" show_snack" text =" show snack" @tap =" onTap" />
8- <MDButton id =" show_snack_action" text =" show snack action" @tap =" onTap" />
9- <MDButton id =" show_snack_action_color" text =" show snack action color" @tap =" onTap" />
10- </StackLayout >
7+ <GridLayout rows =" *, auto" backgroundColor =" blue" >
8+ <StackLayout ref =" innerView" >
9+ <MDButton id =" show_snack" text =" show snack" @tap =" onTap" />
10+ <MDButton id =" show_snack_action" text =" show snack action" @tap =" onTap" />
11+ <MDButton id =" show_snack_action_color" text =" show snack action color" @tap =" onTap" />
12+ </StackLayout >
13+ <MDBottomNavigationBar row =" 1" activeColor =" red" >
14+ <MDBottomNavigationTab title =" First" icon =" res://ic_home" activeColor =" green" />
15+ <MDBottomNavigationTab title =" Second" icon =" res://ic_view_list" isSelectable =" false" />
16+ <MDBottomNavigationTab title =" Third" icon =" res://ic_menu" inactiveColor =" brown" />
17+ </MDBottomNavigationBar >
18+ </GridLayout >
1119 </Page >
1220</template >
1321
@@ -27,7 +35,7 @@ export default Vue.extend({
2735 data() {
2836 return {
2937 name: ' SnackBar' ,
30- title: title
38+ title: title ,
3139 };
3240 },
3341 methods: {
@@ -40,21 +48,21 @@ export default Vue.extend({
4048 console .log (' onTap' , objId , obj );
4149 switch (objId ) {
4250 case ' show_snack' : {
43- showSnack ({ message: ' this is test snack!' , textColor:' yellow' , view:this .nativeView });
51+ showSnack ({ message: ' this is test snack!' , textColor: ' yellow' , view: this . $refs . innerView .nativeView });
4452 break ;
4553 }
4654 case ' show_snack_action' : {
47- showSnack ({ message: ' this is test snack with action!' , actionText:' done' });
55+ showSnack ({ message: ' this is test snack with action!' , actionText: ' done' });
4856 break ;
4957 }
5058 case ' show_snack_action_color' : {
51- showSnack ({ message: ' this is test snack with action colored!' , actionText:' delete' , actionTextColor:' red' }).then (r => {
59+ showSnack ({ message: ' this is test snack with action colored!' , actionText: ' delete' , actionTextColor: ' red' }).then (( r ) => {
5260 console .log (' showSnack result' , r );
5361 });
5462 break ;
5563 }
5664 }
57- }
58- }
65+ },
66+ },
5967});
60- </script >
68+ </script >
0 commit comments