有时候,你可能想在某个组件的根元素上监听一个原生事件。可以使用 v-on 的修饰符 .native。例如:

<my-component v-on:click.native="doTheThing"></my-component>

 

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2021-08-09
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-12-13
  • 2021-11-14
猜你喜欢
  • 2021-10-22
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案