search

Home  >  Q&A  >  body text

javascript - How to obtain the data bound in the child element (swipe-item) in the change event handler of the applet swiper component

As the title says, sub-elements such as <swiper-item data-xxx="xxx"></swiper-item>, how to get the data tied to swiper-item in swiper's change event processing function?

给我你的怀抱给我你的怀抱2750 days ago1560

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-19 10:17:56

    Use event bubbling, and then obtain data through e.target.dataset

    reply
    0
  • Cancelreply