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