Detailed explanation of vue swiper implementation of component development

小云云
Release: 2018-05-24 14:33:06
Original
2458 people have browsed it

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

  
Copy after login

Home.vue component method called

//html  //js import swiper from 'components/swiper/swiper' components: { swiper },
Copy after login

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:

Tutorial on how to implement the image carousel switching function using the WeChat applet swiper component

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!