Fe-interview: [vue] vue中是如何使用event对象的?

Created on 22 Jun 2019  ·  5Comments  ·  Source: haizlin/fe-interview

[vue] vue中是如何使用event对象的?

vue

Most helpful comment

@click=“func” 默认第一个参数传入event对象
@click="func(0, $event)" 如果自己需要传入参数和event对象,则需要使用$event来获取event对象并传入func

All 5 comments

你说的是, 事件event?

@wenyejie 事件的event对象

就是事件: @click='handleClick($events)'

原来如此= =

@click=“func” 默认第一个参数传入event对象
@click="func(0, $event)" 如果自己需要传入参数和event对象,则需要使用$event来获取event对象并传入func

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haizhilin2013 picture haizhilin2013  ·  3Comments

haizhilin2013 picture haizhilin2013  ·  3Comments

undefinedYu picture undefinedYu  ·  3Comments

haizhilin2013 picture haizhilin2013  ·  3Comments

haizhilin2013 picture haizhilin2013  ·  3Comments