mlinquan/vue-awesome-countdown

onFinish event not working

capJavert opened this issue · 3 comments

I am not sure what is wrong but i can't seem to catch onFinish event. From my understanding i should catch it from my Vue instance like:
vm.$on('onFinish', (vac) => finish(vac))

Am I doing something wrong? Maybe also provde some example of that in the docs.
Tnx

<vac
  @onFinish="(vac) => finish(vac)"
>

Reference examples
https://vac.js.org/examples/send-sms-code.html

I am afraid this is not working either. I tried it before also. When I put @onFinish prop on vac component I get this inside the console:

[Vue tip]: Event "onfinish" is emitted in component <VueAwesomeCountdown> at vue-awesome-countdown.vue but the handler is registered for "onFinish". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "on-finish" instead of "onFinish".

Vue emits onfinish event but handler can not catch it because you used camelCase event name which is not supported.

As far as I understand this is bug only when your plugin is used with in-DOM templates.

I am afraid this is not working either. I tried it before also. When I put @onFinish prop on vac component I get this inside the console:

[Vue tip]: Event "onfinish" is emitted in component <VueAwesomeCountdown> at vue-awesome-countdown.vue but the handler is registered for "onFinish". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "on-finish" instead of "onFinish".

Vue emits onfinish event but handler can not catch it because you used camelCase event name which is not supported.

As far as I understand this is bug only when your plugin is used with in-DOM templates.

This issues fixed in 1.0.15.
Thank you your feedback.