Skip to content

Commit

Permalink
test: demo vue
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jul 6, 2020
1 parent 28581d6 commit e58b893
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions demo-vue/app/examples/SnackBar.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<template>
<Page>

<ActionBar :title="title">
<NavigationButton text="Back" android.systemIcon="ic_menu_back" @tap="onNavigationButtonTap" />
</ActionBar>
<GridLayout rows="*, auto" backgroundColor="blue">
<StackLayout ref="innerView">
<MDButton id="show_snack" text="show snack" @tap="onTap" />
<MDButton id="show_snack_action" text="show snack action" @tap="onTap" />
<MDButton id="show_snack_action_color" text="show snack action color" @tap="onTap" />
</StackLayout>
<GridLayout rows="*, auto" id="innerView" ref="innerView">
<Frame actionBarHidden="true">
<Page actionBarHidden="true" backgroundColor="blue">
<StackLayout>
<MDButton id="show_snack" text="show snack" @tap="onTap" />
<MDButton id="show_snack_action" text="show snack action" @tap="onTap" />
<MDButton id="show_snack_action_color" text="show snack action color" @tap="onTap" />
</StackLayout>
</Page>
</Frame>
<MDBottomNavigationBar row="1" activeColor="red">
<MDBottomNavigationTab title="First" icon="res://ic_home" activeColor="green" />
<MDBottomNavigationTab title="Second" icon="res://ic_view_list" isSelectable="false" />
Expand Down Expand Up @@ -56,7 +59,7 @@ export default Vue.extend({
break;
}
case 'show_snack_action_color': {
showSnack({ message: 'this is test snack with action colored!', actionText: 'delete', actionTextColor: 'red' }).then((r) => {
showSnack({ message: 'this is test snack with action colored!', actionText: 'delete', actionTextColor: 'red', view: this.$refs.innerView.nativeView }).then((r) => {
console.log('showSnack result', r);
});
break;
Expand Down

0 comments on commit e58b893

Please sign in to comment.