标签:ebe css ble col view direct direction dir ted
1.下载包
npm install vue-awesome-swiper --save
2.main.js引包
import VueAwesomeSwiper from ‘vue-awesome-swiper‘
Vue.use(VueAwesomeSwiper)
import ‘swiper/dist/css/swiper.css‘
3.组件中使用
<div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide">Slide 1</div> <div class="swiper-slide">Slide 2</div> <div class="swiper-slide">Slide 3</div> <div class="swiper-slide">Slide 4</div> <div class="swiper-slide">Slide 5</div> <div class="swiper-slide">Slide 6</div> <div class="swiper-slide">Slide 7</div> <div class="swiper-slide">Slide 8</div> <div class="swiper-slide">Slide 9</div> <div class="swiper-slide">Slide 10</div> </div> <!-- Add Pagination --> <div class="swiper-pagination"></div> </div> //引包 import Swiper from ‘swiper‘ //使用 mounted(){ var swiper = new Swiper(‘.swiper-container‘, { direction: ‘vertical‘, slidesPerView: 1, spaceBetween: 30, mousewheel: true, pagination: { el: ‘.swiper-pagination‘, clickable: true, }, }); },
标签:ebe css ble col view direct direction dir ted
原文地址:https://www.cnblogs.com/yangjunboHTML/p/13137557.html