I don’t know how much you know about swiper. This article mainly introduces the relevant information about vue+swiper to achieve component development. Friends who need it can refer to it. I hope it can help everyone.
Swiper's component
Home.vue component method called
//html//js import swiper from 'components/swiper/swiper' components: { swiper },
Problem: If you simply call _initSwiper method, you will find that the page cannot be scrolled, but the page can be modified casually, and then the saved swiper can be scrolled. This reason is that the initial swiper node was not created successfully, and the value page is penetrated, layer by layer. The value of swiper can be printed as empty, and the value can be passed in when the value is modified, so here we need to update the siwper method by judging whether the node is successful
Related recommendations:
Implementation of mobile effect CellSwiper
How to implement the WeChat applet Example of the non-swiper effect of the top normal tab
The above is the detailed content of Detailed explanation of vue swiper implementation of component development. For more information, please follow other related articles on the PHP Chinese website!