Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
v-ons-col @click broken in Vue bindings 2.0.2?
-
Seem to work OK in 2.0.0, now only works when removing v- from v-ons-col.
-
@denious Hi! I think it shouldn’t have worked before 2.0.2 either. The
@click
handler is using Vue component events, not DOM native events.v-ons-col
is not a clickable component so it should not implement a “click” component event. You can, however, listen to DOM events with@click.native="..."
and this will always work (v-on “native” modifier).The reason why it works with
ons-col
(instead ofv-ons-col
) is that it is an actual DOM element so@click
directly uses the DOM event.
-
Very cool knowledge, Fran, thanks for the insight!