summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/deck/deck.column-template.vue
blob: 59232851624720ce30966224de6a9f0e9cd9fa35 (plain)
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
<template>
<x-column>
	<template #header>
		<fa v-if="icon" :icon="icon"/>{{ title }}
	</template>

	<div>
		<component :is="component" @init="init" v-bind="$attrs"/>
	</div>
</x-column>
</template>

<script lang="ts">
import Vue from 'vue';
import XColumn from './deck.column.vue';

export default Vue.extend({
	components: {
		XColumn,
	},

	props: {
		component: {
			required: true
		}
	},

	data() {
		return {
			title: null,
			icon: null,
		};
	},

	mounted() {
	},

	methods: {
		init(v) {
			this.title = v.title;
			this.icon = v.icon;
		}
	}
});
</script>