| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <template>
- <section id="proginn-container">
- <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>
- <style>
- #proginn-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- #main {
- flex: 1;
- }
- </style>
|