Home  >  Q&A  >  body text

javascript - When clicking the left and right switching arrow of swipe, the current vue instance is accessed inside the slideNext function in the swipe source code.

The current requirement is to use vue to make a tab bar with swipe carousel component.
When I click on the left and right heads of the carousel image, I want to get the page number of the current page in the slideNext function of swipe, and pass the page number to the vue instance to achieve the synchronization effect of the carousel image and the tab bar. !
But now var vm = new Vue(), the access in the slideNext function is underfined.
Solution

漂亮男人漂亮男人2696 days ago719

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-06-26 11:00:16

    Do you have a code? (coo coo coo)

    reply
    0
  • Cancelreply