[Vuejs]-Can add components dynamically in component in vuejs

0👍

You can pass the names of components, e. g. ['comp1', 'comp2'], then you have to register all the components, that could be passed (components: {comp1, comp2, comp3...}), and then you can use this structure:

<component v-for="(component, key) in components" :key="key" :is="component" />

this method would render the components you passed

Leave a comment