vue里面使用swiper

下载swiper:

npm install swiper --save-dev

html:

Slide 1
Slide 2
Slide 3

js:


在main.js导入文件:

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './swiper/swiper.min.js';
import './swiper/swiper.min.css';

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: ''
})
vue里面使用swiper_第1张图片
QQ图片20191202151335.png

你可能感兴趣的:(vue里面使用swiper)