-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
/
Base.vue
49 lines (41 loc) 路 802 Bytes
/
Base.vue
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
47
48
49
<template>
<v-sheet
:style="styles"
class="v-app-ad d-inline-flex flex-child-1 grow-shrink-0 mt-2 mb-4"
rounded
width="100%"
v-bind="$attrs"
>
<slot />
</v-sheet>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
name: 'AdsBase',
inheritAttrs: false,
props: {
compact: Boolean,
comfortable: Boolean,
},
computed: {
minHeight () {
if (this.compact) return 52
if (this.comfortable) return 74
return 118
},
styles () {
return {
minHeight: `${this.minHeight}px`,
}
},
},
})
</script>
<style lang="sass">
.v-app-ad
a
text-decoration: none
.v-markdown p
margin-bottom: 0
</style>