ViewContainer.vue 785 Bytes
<template>
  <div class='ViewContainer'>
    <div class='ViewContainer-title'>
      <slot name='title' />
    </div>
    <div class='ViewContainer-body' @click='hideTitles'>
      <slot name='content' />
    </div>
  </div>
</template>

<script type='text/ecmascript-6'>
export default {
  name: 'ViewContainer',
  props: {},
  data() {
    return {}
  },
  mounted() {
  },
  methods: {
    hideTitles() {
      this.$bus.$emit('hideEvent', { title: '11111' })
    }
  }
}
</script>

<style scoped lang='scss'>
.ViewContainer {
  width: 100vw;
  height: 100vh;

  &-title {
    height: 6.1vh;
    width: 100%;
    background-image: url('../assets/images/bg-title.jpg');
    background-repeat: no-repeat;
    background-size: cover;
  }

  &-body {
    height: 93.9vh;
  }
}
</style>