Vux: cell怎么绑定事件?

Created on 6 Apr 2016  ·  4Comments  ·  Source: airyland/vux

cell这个组件怎么在它上面绑定@click事件?按普通的做法写上去貌似没作用。cell里加个slot倒是可以绑在slot上,但我想绑在cell上。

Most helpful comment

@janchengwang vue2.0在组件上绑定点击事件要使用 @click.native

All 4 comments

直接按照vue方法绑定在cell上就行了。

 <cell title="My Account" value="Protected" @click="fn"></cell>

vue2.0
<cell is-link @click="choosePic"> <img slot="icon" width="48" style="display:block;margin-right:8px;" src="https://o3e85j0cv.qnssl.com/tulips-1083572__340.jpg"> </cell>
没有效果,我是想点击cell,然后显示actionsheet

@janchengwang vue2.0在组件上绑定点击事件要使用 @click.native

@airyland ok, 好了

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FlyArtist picture FlyArtist  ·  3Comments

RenShine picture RenShine  ·  4Comments

varHarrie picture varHarrie  ·  4Comments

wonghoman picture wonghoman  ·  4Comments

mymmoonoa picture mymmoonoa  ·  4Comments