-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
AllSides.vue
51 lines (44 loc) · 1.92 KB
/
AllSides.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
<Page>
<ActionBar>
<NavigationButton text="Back" android.systemIcon="ic_menu_back" @tap="$navigateBack" />
<Label text="All Sides" />
</ActionBar>
<Drawer ref="drawer">
<GridLayout ~leftDrawer class="drawer" width="65%" height="100%" backgroundColor="white" padding="25">
<Label text="Left Drawer" verticalAlignment="top" />
</GridLayout>
<GridLayout ~rightDrawer class="drawer" width="65%" height="100%" backgroundColor="white" padding="25">
<Label text="Right Drawer" verticalAlignment="top" />
</GridLayout>
<GridLayout ~topDrawer class="drawer" height="65%" width="100%" backgroundColor="white" padding="25">
<Label text="Top Drawer" verticalAlignment="top" />
</GridLayout>
<GridLayout ~bottomDrawer class="drawer" height="65%" width="100%" backgroundColor="white" padding="25">
<Label text="Bottom Drawer" verticalAlignment="top" />
</GridLayout>
<StackLayout ~mainContent backgroundColor="white">
<Button @tap="onOpenDrawer('left')" text="Open Left Drawer" width="250" marginTop="25" />
<Button @tap="onOpenDrawer('right')" text="Open Right Drawer" width="250" marginTop="25" />
<Button @tap="onOpenDrawer('top')" text="Open Top Drawer" width="250" marginTop="25" />
<Button @tap="onOpenDrawer('bottom')" text="Open Bottom Drawer" width="250" marginTop="25" />
</StackLayout>
</Drawer>
</Page>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
computed: {
message() {
return 'Blank {N}-Vue app';
}
},
methods: {
onOpenDrawer(side: string) {
this.$refs['drawer'].open(side);
}
}
});
</script>
<style lang="scss" scoped></style>