]> git.immae.eu Git - github/bastienwirtz/homer.git/blame_incremental - src/components/Service.vue
Avoid hidding all info when copy pasting the exemple config
[github/bastienwirtz/homer.git] / src / components / Service.vue
... / ...
CommitLineData
1<template>
2 <component :is="component" :item="item" :proxy="proxy"></component>
3</template>
4
5<script>
6import { defineAsyncComponent } from "vue";
7import Generic from "./services/Generic.vue";
8
9export default {
10 name: "Service",
11 props: {
12 item: Object,
13 proxy: Object,
14 },
15 computed: {
16 component() {
17 const type = this.item.type || "Generic";
18 if (type === "Generic") {
19 return Generic;
20 }
21 return defineAsyncComponent(() => import(`./services/${type}.vue`));
22 },
23 },
24};
25</script>