//--- html
<component
v-for="(comp, index) in dynamic"
:key="index"
:is="comp.component"
v-bind="{...comp.props}" />
//--- script vue
import component1 from 'component1';
import component2 from 'component2';
export default {
components: {
component1,
component2
},
data(){
return {
dynamic: [
{
component: 'component1',
props: {foo: bar, ...}
},
{
component: 'component2',
props: {foo: bar, ...}
},
]
}
}
}