Vue v-on:click.native in JSX?
Answer was in the documentation for babel-plugin-transform-vue-jsx and it is nativeOnClick
:
<el nativeOnClick={this.nativeOnClickHandler} />
Accepted answer is wrong.
When using JSX (render function) you'd do this:
{
components: {someComp},
functional: true,
render:function (h, c){
return h(someComp, {
nativeOn: {
click: function(){
//stuffs
}
},
}, []);
}
}
import SomeComp from '...'
return default {
functional: true,
render: (h, c) => <SomeComp nativeOn={{ click: e => { /* ... */} }} />
}