Vue v-on:click.native in JSX?

问题: How to write vue syntax v-on:click.native in JSX? For example v-on:click in JSX is onClick. (Edit after meta discussion) I originally posted this question with jsx ta...

问题:

How to write vue syntax v-on:click.native in JSX?

For example v-on:click in JSX is onClick.

(Edit after meta discussion)

I originally posted this question with jsx tag but it was converted to reactjs. React has nothing to do with this question. I'm leaving reactjs tag for sake of this meta discussion.


回答1:

Answer was in the documentation for babel-plugin-transform-vue-jsx and it is nativeOnClick:

<el nativeOnClick={this.nativeOnClickHandler} />
  • 发表于 2018-07-07 00:17
  • 阅读 ( 223 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除