-
-
Save DenisNP/5b1e4251773be9e1503d39e198aa3130 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<Page> | |
<ActionBar> | |
<GridLayout width="100%" columns="auto, *"> | |
<Label text="MENU" @tap="$refs.drawer.nativeView.showDrawer()" col="0"/> | |
<Label class="title" text="Welcome to NativeScript-Vue!" col="1"/> | |
</GridLayout> | |
</ActionBar> | |
<RadSideDrawer ref="drawer"> | |
<StackLayout ~drawerContent backgroundColor="#ffffff"> | |
<Label class="drawer-header" text="Drawer"/> | |
<Label class="drawer-item" text="Item 1"/> | |
<Label class="drawer-item" text="Item 2"/> | |
<Label class="drawer-item" text="Item 3"/> | |
</StackLayout> | |
<GridLayout ~mainContent columns="*" rows="*"> | |
<Label class="message" :text="msg" col="0" row="0"/> | |
</GridLayout> | |
</RadSideDrawer> | |
</Page> | |
</template> | |
<script lang="ts"> | |
import { Vue, Component, Prop } from "vue-property-decorator"; | |
const RadSideDrawer = require('nativescript-ui-sidedrawer').RadSideDrawer; | |
@Component({ | |
components: { | |
RadSideDrawer, | |
} | |
}) | |
export default class App extends Vue { | |
msg: string = "Hello"; | |
} | |
</script> | |
<style scoped> | |
ActionBar { | |
background-color: #53ba82; | |
color: #ffffff; | |
} | |
.title { | |
text-align: left; | |
padding-left: 16; | |
} | |
.message { | |
vertical-align: center; | |
text-align: center; | |
font-size: 20; | |
color: #333333; | |
} | |
.drawer-header { | |
padding: 50 16 16 16; | |
margin-bottom: 16; | |
background-color: #53ba82; | |
color: #ffffff; | |
font-size: 24; | |
} | |
.drawer-item { | |
padding: 8 16; | |
color: #333333; | |
font-size: 16; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment