ViewContainer.vue
785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<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>