App.vue 1.14 KB
Newer Older
SHINDAESUB committed
1 2 3
<template>
  <v-app>
    <v-main>
SHINDAESUB committed
4 5 6 7 8
      <Alert
        :open="alertOpen"
        :message="message"
        :type="type"
      />
SHINDAESUB committed
9 10 11 12 13 14
      <router-view/>
    </v-main>
  </v-app>
</template>

<script>
SHINDAESUB committed
15
import { EventBus } from '@/event-bus'
SHINDAESUB committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

import Alert from './components/Alert.vue'

export default {
  name: 'App',

  components: {
    Alert
  },

  created() {
    EventBus.$on('openAlert',( massage , type) => { 
      this.alertOpen = true, 
      this.message = massage,
      this.type = type
    }),

SHINDAESUB committed
33
    EventBus.$on('closeAlert',() => { this.alertOpen = false })
SHINDAESUB committed
34 35 36 37 38 39 40 41 42 43
  
  },

  data: () => ({
    alertOpen: false ,
    message:'',
    type:'',
  }),

  mounted(){
SHINDAESUB committed
44
    // this.$store.dispatch('getProjectList')
SHINDAESUB committed
45
  },
SHINDAESUB committed
46 47 48
  beforeDestroy(){
    EventBus.$off('openAlert');
    EventBus.$off('closeAlert');
SHINDAESUB committed
49
  }
SHINDAESUB committed
50 51 52 53 54 55 56 57 58 59 60 61
};
</script>
<style lang="scss">

html,body{
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%
}

#app {
SHINDAESUB committed
62
  background-color:#CFD8DC;
SHINDAESUB committed
63 64 65 66
  height: 100%;
  width: 100%;
}

SHINDAESUB committed
67 68 69 70 71 72 73 74 75
html  {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera*/
}


SHINDAESUB committed
76
</style>