mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-02-01 12:09:10 +01:00
25 lines
467 B
Vue
25 lines
467 B
Vue
<template>
|
|
<component v-bind:is="component" :item="item" :proxy="proxy"></component>
|
|
</template>
|
|
|
|
<script>
|
|
import Generic from "./services/Generic.vue";
|
|
|
|
export default {
|
|
name: "Service",
|
|
props: {
|
|
item: Object,
|
|
proxy: Object,
|
|
},
|
|
computed: {
|
|
component() {
|
|
const type = this.item.type || "Generic";
|
|
if (type === "Generic") {
|
|
return Generic;
|
|
}
|
|
return () => import(`./services/${type}.vue`);
|
|
},
|
|
},
|
|
};
|
|
</script>
|