You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiler-sfc adds __name property to <script setup>, but it does not adds __name property to regular <script>. Is it appropriate to add __name to all types of <script> so I can get inferred name if one component does not have a name property.
If you only need the component name, you can retrieve it using the following code within the setup function: getCurrentInstance().proxy.$options.name. When you use Single-File Components, the component already infers its own name from the filename.
What problem does this feature solve?
compiler-sfc
adds__name
property to<script setup>
, but it does not adds__name
property to regular<script>
. Is it appropriate to add__name
to all types of<script>
so I can get inferred name if one component does not have aname
property.What does the proposed API look like?
In all conditions, I can get
__name
:The text was updated successfully, but these errors were encountered: