-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
/
Vuetify.vue
66 lines (56 loc) 路 1.29 KB
/
Vuetify.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
<ads-base
class="v-vuetify"
v-bind="$attrs"
comfortable
border
>
<v-list-item
v-if="ad"
class="rounded px-2"
style="min-height: inherit; width: 100%"
v-bind="attrs"
:prepend-avatar="src"
:title="ad.title"
>
<template #subtitle>
<app-markdown
v-if="description"
class="text-caption text--secondary"
:content="description"
/>
</template>
</v-list-item>
</ads-base>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import { createAdProps, useAd } from '../../composables/ad'
import AdsBase from './Base.vue'
// Mixins
export default defineComponent({
name: 'AdsVuetify',
components: { AdsBase },
props: {
color: String,
...createAdProps(),
},
setup (props) {
const { t } = useI18n()
const { ad, attrs, src, description } = useAd(props)
return { t, ad, attrs, src, description }
},
})
</script>
<style lang="sass">
.v-vuetify
.powered-by
color: rgba(0, 0, 0, .6)
font-size: 0.625rem
font-weight: 400
letter-spacing: 0.09375rem
text-transform: uppercase
&.theme--dark .powered-by
color: inherit
</style>