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
In script setup, if we want to declare some options like name or inheritAttrs, we need to add a new script block without setup, how about place options in defineOptions({ name: 'MyComponent' }), so we still use a single setup script, and no need to add extra script tag.
What does the proposed API look like?
Just like defineProps and defineEmits, offer an api named defineOptions
What problem does this feature solve?
In script setup, if we want to declare some options like
name
orinheritAttrs
, we need to add a new script block without setup, how about place options indefineOptions({ name: 'MyComponent' })
, so we still use a single setup script, and no need to add extra script tag.What does the proposed API look like?
Just like defineProps and defineEmits, offer an api named
defineOptions
The text was updated successfully, but these errors were encountered: