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


           
                                           

                                             



                  
                  
    


                                               
                               

                       
                                                                          

      

         
<template>
  <component :is="component" :item="item" :proxy="proxy"></component>
</template>

<script>
import { defineAsyncComponent } from "vue";
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 defineAsyncComponent(() => import(`./services/${type}.vue`));
    },
  },
};
</script>