vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
46.3k stars 8.12k forks source link

Is it possible to create a function in script setup to name the component like 'defineName' #5567

Closed gastrodia closed 2 years ago

gastrodia commented 2 years ago

What problem does this feature solve?

It looks strange X﹏X

<script lang="ts">
export default { name: 'XXX' }
</script>

<script setup lang="ts">
// do something ...
</script>

What does the proposed API look like?

ygj6 commented 2 years ago

https://github.com/vuejs/rfcs/discussions/430