primevue-mirror/src/App.vue

46 lines
1.1 KiB
Vue
Raw Normal View History

<template>
2018-12-06 18:26:49 +00:00
<div class="layout-wrapper">
2018-12-26 09:36:00 +00:00
<app-topbar @menubutton-click="onMenuButtonClick"/>
<app-menu :active="sidebarActive" @menuitem-click="onMenuItemClick" />
<div :class="['layout-mask', {'layout-mask-active': sidebarActive}]" @click="onMaskClick"></div>
2018-12-06 18:26:49 +00:00
<div class="layout-content">
<router-view/>
<app-footer />
2018-12-06 18:26:49 +00:00
</div>
</div>
</template>
2018-12-06 18:26:49 +00:00
<script>
import AppTopBar from '@/AppTopBar.vue';
import AppMenu from '@/AppMenu.vue';
import AppFooter from '@/AppFooter.vue';
2018-12-06 18:26:49 +00:00
export default {
2018-12-26 09:36:00 +00:00
data() {
return {
sidebarActive: false
}
},
methods: {
onMenuButtonClick() {
this.sidebarActive = !this.sidebarActive;
},
onMenuItemClick(event) {
this.sidebarActive = false;
},
onMaskClick(event) {
this.sidebarActive = false;
}
},
components: {
'app-topbar': AppTopBar,
'app-menu': AppMenu,
'app-footer': AppFooter
2018-12-26 09:36:00 +00:00
},
}
2018-12-06 18:26:49 +00:00
</script>
<style lang="scss">
@import './assets/styles/app.scss';
</style>