vue.js中使用swiper的方法:首先下载【swiper.js】;然后在【main.js】中全局引入【swiper.js】;最后在模板中配置相关内容即可。
vue.js中使用swiper的方法:
1、下载swiper.js
npm install vue-awesome-swiper --save
2、在main.js中全局引入swiper.js
import VueAwesomeSwiper from 'vue-awesome-swiper' import 'swiper/dist/css/swiper.css' Vue.use(VueAwesomeSwiper)
3、在模板中配置相关内容
下一篇:vue.js阻止事件冒泡的方法