mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
c1ddb359e3
Co-authored-by: Damian Głowala <damian.glowala.rebkow@gmail.com>
38 lines
534 B
Vue
38 lines
534 B
Vue
<template>
|
|
<component
|
|
:is="showIt"
|
|
:name="name"
|
|
/>
|
|
</template>
|
|
|
|
<script>
|
|
export default defineNuxtComponent({
|
|
props: {
|
|
template: {
|
|
required: true,
|
|
type: String
|
|
},
|
|
name: {
|
|
type: String,
|
|
default: () => '(missing name prop)'
|
|
}
|
|
},
|
|
setup (props) {
|
|
const showIt = h({
|
|
template: props.template,
|
|
props: {
|
|
|
|
name: {
|
|
type: String,
|
|
default: () => '(missing name prop)'
|
|
}
|
|
}
|
|
})
|
|
|
|
return {
|
|
showIt
|
|
}
|
|
}
|
|
})
|
|
</script>
|