ViewLineGroup.vue
668 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
<template>
<div class="line-group">
<template v-for="(i,index) in items">
<div
class="box"
:key="index"
:style="[{'height':height},{'margin-bottom':hideMargin?0:'1vh'}]"
></div>
</template>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ViewLineGroup',
props: {
height: {
type: String,
default: '19.8vh'
},
hideMargin: Boolean
},
data () {
return {
items: [1, 2]
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.line-group {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0 8px;
}
</style>