]>
Commit | Line | Data |
---|---|---|
b9c5fcf0 | 1 | <template> |
0a3be103 | 2 | <component v-bind:is="component" :item="item" :proxy="proxy"></component> |
b9c5fcf0 BW |
3 | </template> |
4 | ||
5 | <script> | |
9a14de00 BW |
6 | import Generic from "./services/Generic.vue"; |
7 | ||
b9c5fcf0 BW |
8 | export default { |
9 | name: "Service", | |
10 | props: { | |
11 | item: Object, | |
0a3be103 | 12 | proxy: Object, |
b9c5fcf0 | 13 | }, |
9a14de00 BW |
14 | computed: { |
15 | component() { | |
16 | const type = this.item.type || "Generic"; | |
2ca4faad | 17 | if (type === "Generic") { |
9a14de00 BW |
18 | return Generic; |
19 | } | |
20 | return () => import(`./services/${type}.vue`); | |
21 | }, | |
22 | }, | |
b9c5fcf0 BW |
23 | }; |
24 | </script> |