1、npm安装swiper插件 npm install vue-awisome-swiper --save 2、在main.js中全局注册(import并Vue.use) 注:需要引入swiper.css样式 3、在组件中使用