Closed
Description
What problem does this feature solve?
In Jan, I create an issue to discuss that add the name attribute
in <script setup>, made a hot discussion, many friends like this idea and hold that vue can support it
NOW! I have a new idea, in the <script setup>, I can write my JSX by new API - defineTemplate
E.g.
<script lang="ts">
export default defineComponent({
name: 'Comp',
setup() {
const msg = ref('hi')
return () => (
<div>{{ msg }}</div>
)
}
})
</script>
<script setup name="Comp">
const msg = ref('hi')
defineTemplate(() => (
<div>{{ msg }}</div>
))
</script>
What does the proposed API look like?
new attribute - <script setup name>
new API - defineTemplate
Metadata
Metadata
Assignees
Labels
No labels