<template>
<div>
<component :is="component" />
</div>
</template>
<script>
import Batch from '~/components/Batch'
import Note from '~/components/Note'
export default {
props: ['componentType']
computed: {
component() {
/*
switch (componentType) {
case 'Batch':
return Batch
case 'Note':
return Note
}
*/
return componentType
}
},
components: { Batch, Note }
}
References: