1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-10-29 20:54:19 +00:00
5e-drs/docs/.vuepress/theme/layouts/Layout.vue

45 lines
808 B
Vue
Raw Normal View History

2020-03-26 19:04:23 +01:00
<template>
<div>
2020-03-30 11:03:20 +02:00
<Page></Page>
2020-03-26 19:04:23 +01:00
</div>
</template>
<script>
2020-03-30 11:03:20 +02:00
import Page from '@theme/components/Page.vue'
2020-03-26 19:04:23 +01:00
export default {
name: 'Layout',
components: {
2020-03-30 11:03:20 +02:00
Page
2020-03-26 19:04:23 +01:00
},
computed: {
2020-04-02 14:20:33 +02:00
},
methods: {
setRightDrawer () {
this.$store.commit('setHasRightDrawer', false)
this.$store.commit('setRightDrawer', false)
this.$store.commit('setInRightDrawer', null)
if (this.$page.headers && this.$page.headers.length > 0 && this.$page.frontmatter.toc !== false) {
this.$store.commit('setHasRightDrawer', true)
this.$store.commit('setRightDrawer', true)
this.$store.commit('setInRightDrawer', 'pageToc')
}
}
},
watch: {
$route (id) {
this.setRightDrawer()
}
},
mounted () {
this.setRightDrawer()
2020-03-26 19:04:23 +01:00
}
}
</script>