Nuxt/test/fixtures/full-static-with-preview/components/ComponentRenderer.vue

25 lines
466 B
Vue
Raw Normal View History

<template>
<component :is="component.name" v-bind="component.props">
<template v-if="component.components">
<ComponentRenderer
v-for="nestedComponent in component.components"
:key="nestedComponent.id"
:component="nestedComponent"
/>
</template>
</component>
</template>
<script>
export default {
name: 'ComponentRenderer',
props: {
component: {
type: Object,
required: true
}
}
}
</script>