0👍
self.$emit('failed',false);
<SocialLogin @wait="waitOnSocial" @failed="(v)=>{socialFailed = v}" @toggleAuth="socialLoginInProgress" style="width: 100%" />
Refactor to direct emit payload.
0👍
try this.$emit
Because the this keyword has a different value in the function that is invoked by setInterval.
You already know the solution with the self variable in a closure, a different (and shorter) solution would be binding the emit method:
- [Vuejs]-DOMException Error when trying to play audio in Vue.JS App
- [Vuejs]-Flex-Wrap: Equal (Max-)Width for elements wrapped by column
0👍
The only solution I could find was a little hacky and instead of emitting in the child component I access the parent variable directly:
this.$parent.showForm = true;
- [Vuejs]-How do I dynamically add CSS classes to HTML elements if value is less or greater than 0?
- [Vuejs]-How can I save data from my calculator with cookie in vue?
Source:stackexchange.com