vue.js has carousel diagram plug-ins, such as vue-concise-slider, which is a carousel component based on Swiper4 and suitable for Vue. It supports server-side rendering and single-page applications; vue-awesome-swiper configuration Simple, supports adaptive/full-screen button paging, and is compatible with both mobile and PC.
##vue.js carousel plug-in vue-awesome-swiper
vue-awesome-swiper is based on Swiper4 , a carousel component suitable for Vue, supporting server-side rendering and single-page applications. vue-awesome-swiper is based on swiper. Installing different versions of vue-awesome-swiper corresponds to different swiper, so most of the properties in swiper can be applied to vue-awesome-swiper, or according to swiper Document to set vue-awesome-swiper properties;swiper official documentation: https://www.swiper.com.cn/api/index2.htmlInstallation:
npm install vue-awesome-swiper --save
Import usage:
// import import Vue from 'vue' import VueAwesomeSwiper from 'vue-awesome-swiper' // mount with global Vue.use(VueAwesomeSwiper) // mount with component import { swiper, swiperSlide } from 'vue-awesome-swiper' export default { components: { swiper, swiperSlide } }
Case display and sample code:
https://surmon-china. github.io/vue-awesome-swiper/Pay attention to version changes
starting with version 2.6.0, you need to manually introduce swiper's css
import 'swiper/dist/css/swiper.css'
Programming Course! !
The above is the detailed content of Is there a carousel image plugin for vue.js?. For more information, please follow other related articles on the PHP Chinese website!