primevue-mirror/src/App.vue

49 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" />
2018-12-26 09:36:00 +00:00
<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>
2019-02-08 10:55:52 +00:00
<Toast />
</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
}
},
watch: {
$route() {
this.sidebarActive = false;
}
},
2018-12-26 09:36:00 +00:00
methods: {
onMenuButtonClick() {
this.sidebarActive = !this.sidebarActive;
},
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>