aboutsummaryrefslogblamecommitdiffhomepage
path: root/src/components/Service.vue
blob: 39a9ac41e0df81855e4970f012d775eb2b09a398 (plain) (tree)
1
2
3
4
5
6
7
          
                                                            


           

                                             




                  


                                               
                               




                                                    

         
<template>
  <component v-bind:is="component" :item="item"></component>
</template>

<script>
import Generic from "./services/Generic.vue";

export default {
  name: "Service",
  props: {
    item: Object,
  },
  computed: {
    component() {
      const type = this.item.type || "Generic";
      if (type === "Generic") {
        return Generic;
      }
      return () => import(`./services/${type}.vue`);
    },
  },
};
</script>