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
A similar issue was reported in 2.x long time ago vuejs/vue#5443
however, emit in vue 3 works differently than $emit in 2.x. In vue 3, emit basically calls a prop which name starts with onXXX so emit('click') is equivalent to calling props.onClick(). As we can see in the source code emit currently doesn't return anything so you should probably try with calling the onClick prop directly:
awaitprops.onClick()// or// Promise.all expects an arrayawaitPromise.all([props.onClick()])
Now that I think about it, simply returning an array containing the values of all triggered handlers would make sense. It'd be best to submit an RFC for this though: https://github.com/vuejs/rfcs
What problem does this feature solve?
That can do something after emit event。
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: