-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: rewrite to Composition API #446
feature: rewrite to Composition API #446
Conversation
@daniil4udo wow! that's huge & looks promising. thanks for your help! |
Did for the template. Not sure I can do it inside the script tag. also made tests work + added extra |
@daniil4udo that's awesome! thanks a heap! |
@daniil4udo there are some errors when I try |
I know it's a lot of changes... I didn't change any logic, just an attempt to add typings and Composition API
defineModel
getDefault
moved to theutils.ts
- there's an important limitation to keep in mind: defineProps() (and similar functions like defineEmits() or useSlots()) cannot reference locally declared variables within the same <script setup> block. This limitation arises because these API calls are hoisted outside of the setup function by the Vue compiler during the SFC compilation process. Hoisting means that these calls are moved to the top of the module scope, so they execute before any local variables are defined, thus they cannot reference those variables.