]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - src/components/Service.vue
Added forwarder binding to Service.vue
[github/bastienwirtz/homer.git] / src / components / Service.vue
CommitLineData
b9c5fcf0 1<template>
a4c1f6a3
ES
2 <component
3 v-bind:is="component"
4 :item="item"
5 :proxy="proxy"
6 :forwarder="forwarder"
7 ></component>
b9c5fcf0
BW
8</template>
9
10<script>
9a14de00
BW
11import Generic from "./services/Generic.vue";
12
b9c5fcf0
BW
13export default {
14 name: "Service",
15 props: {
16 item: Object,
0a3be103 17 proxy: Object,
a4c1f6a3 18 forwarder: Object,
b9c5fcf0 19 },
9a14de00
BW
20 computed: {
21 component() {
22 const type = this.item.type || "Generic";
2ca4faad 23 if (type === "Generic") {
9a14de00
BW
24 return Generic;
25 }
26 return () => import(`./services/${type}.vue`);
27 },
28 },
b9c5fcf0
BW
29};
30</script>