mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
25 lines
466 B
Vue
25 lines
466 B
Vue
<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>
|