First installed in vue used by Swipernpm i vue-awesome-swiper --save .
After the installation is complete, plugins create a new swiper.js file folder. js file as follows import Vue from 'vue' import VueAwesomeSwiper from 'vue-awesome-swiper/dist/ssr' Vue.use(VueAwesomeSwiper)
The swiper.animate1.0.3.min.js, animate.min.css file in the static folder, or assets folder can be, I personally put static folder, according to the file where you have placed in nuxt.config.js configuration css, followed plugins new folder animate.js file. PS :( personally think animate.js dependent on swiper.js , and therefore ended up without the use of plug-in head in the script tag form, it is dependent on the order in question). Closer to home, animate.js used in the file import '../static/js/swiper.animate1.0.3.min'mode is introduced animate, in nuxt.config.js plugins at the animate.js plug disposed swiper behind the plug. eg:
All preparations are configured end, see below, since nuxt use swiper need to use v-swiper:mySwiper="swiperOption"way. EG :
Requires the animate is required as follows, with reference to the program or the official website provides: [→ Portal ]
At last
Here, over, different animation effects can be selected according to the official website of the class name provided. [→ effect portal ]