Home > Web Front-end > Vue.js > Is there a carousel image plugin for vue.js?

Is there a carousel image plugin for vue.js?

青灯夜游
Release: 2020-11-20 14:43:19
Original
2574 people have browsed it

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.

Is there a carousel image plugin for vue.js?

##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.html

Installation:

npm install vue-awesome-swiper --save
Copy after login

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
  }
}
Copy after login

Case display and sample code:

https://surmon-china. github.io/vue-awesome-swiper/

Is there a carousel image plugin for vue.js?

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'
Copy after login
For more programming-related knowledge, please visit:

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!

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template