|
|
@@ -1,20 +1,36 @@
|
|
|
<template>
|
|
|
<section id="proginn-container">
|
|
|
- <proginn-header/>
|
|
|
- <router-view id="main"/>
|
|
|
- <proginn-footer/>
|
|
|
+ <proginn-header v-if="isPC != -1 && isPC"/>
|
|
|
+ <router-view v-if="isPC != -1" id="main"/>
|
|
|
+ <proginn-footer v-if="isPC != -1 && isPC"/>
|
|
|
</section>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import ProginnHeader from '@/components/header'
|
|
|
import ProginnFooter from '@/components/footer'
|
|
|
+import { mapState, mapMutations } from 'vuex'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
ProginnHeader,
|
|
|
ProginnFooter
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['isPC']),
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.checkInnerWidth()
|
|
|
+ window.addEventListener('resize', this.checkInnerWidth)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapMutations(['updateIsPC']),
|
|
|
+ checkInnerWidth() {
|
|
|
+ this.updateIsPC({
|
|
|
+ isPC: window.innerWidth > 960,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|