<template>
  <div class="layout">
    <y-header @reload="reload" />
    <keep-alive exclude="shopEnterAdd,infoList,shopEnter,user" v-if="showView">
      <router-view />
    </keep-alive>
    <y-footer />
  </div>
</template>
<script lang="ts">
import { Component, Vue, Watch } from "vue-property-decorator";
import yHeader from "./components/header.vue";
import yFooter from "./components/footer.vue";
@Component({
  components: {
    yHeader,
    yFooter
  }
})
export default class extends Vue {
  private showView = true;

  reload() {
    console.log("reload");
    this.showView = false;
    this.$nextTick(() => (this.showView = true));
  }
}
</script>
<style lang="scss" scoped>
.layout {
  height: 100%;
}
</style>
