-
-
Notifications
You must be signed in to change notification settings - Fork 241
/
oh-gauge-card.vue
38 lines (35 loc) · 1.17 KB
/
oh-gauge-card.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
<template>
<oh-card :context="context" :content-class="['oh-gauge-card', 'display-flex', 'justify-content-center']">
<template #content-root>
<f7-card-content :style="config.contentStyle" :class="[ ...(Array.isArray(config.contentClass) ? config.contentClass : []), 'oh-gauge-card', 'display-flex', 'justify-content-center']">
<f7-link v-if="config.action" class="oh-gauge-link" @click="performAction">
<oh-gauge :context="childContext(context.component)" />
</f7-link>
<oh-gauge v-else :context="childContext(context.component)" />
</f7-card-content>
</template>
</oh-card>
</template>
<style lang="stylus">
.oh-gauge-link
position absolute
top 0
left 0
width 100%
height 100%
</style>
<script>
import mixin from '../widget-mixin'
import { actionsMixin } from '@/components/widgets/widget-actions'
import OhCard from '@/components/widgets/standard/oh-card.vue'
import OhGauge from '../system/oh-gauge.vue'
import { OhGaugeCardDefinition } from '@/assets/definitions/widgets/standard/cards'
export default {
mixins: [mixin, actionsMixin],
components: {
OhCard,
OhGauge
},
widget: OhGaugeCardDefinition
}
</script>