Nuxt/test/fixtures/runtime-compiler/components/ShowTemplate.vue

36 lines
525 B
Vue
Raw Permalink Normal View History

<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>