Home  >  Q&A  >  body text

javascript - How to make the mouseOut event in vue.js bubble up.

I added a mouseout event to the parent box b of box a. This event will always be triggered when the mouse enters box a (the absolute positioning of box a, I don’t know if it has any impact), but I hope that it will not be triggered when the mouse enters box a. Please give me some advice on how to resolve this incident~~

大家讲道理大家讲道理2635 days ago780

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-07-05 10:57:24

    Add .prevent modifier

    reply
    0
  • 阿神

    阿神2017-07-05 10:57:24

    You can use the event modifier .self to modify it to indicate that only the bound dom itself is triggered. The native event is event.currentTarget.
    Reference: https://cn.vuejs.org/v2/guide... event-amp-key modifier

    reply
    0
  • Cancelreply