How to use swiper.js in mpvue

recently, I have been using mpvue framework to build Mini Program, and some carousel graphs are used on the page. WeChat Mini Programs"s swiper does not quite meet the requirements, so I want to introduce a third-party carousel graph plug-in.
slick.js this is based on jquery, and jquery doesn"t seem to work in WeChat Mini Programs.
now I"m going to use swiper.js without relying on jquery

.

install according to the website as follows:

npm install vue-awesome-swiper --save

import Vue from "vue"
import VueAwesomeSwiper from "vue-awesome-swiper"

WeChat Mini Programs console throw error:

VM7630:1 thirdScriptError
sdk uncaught third Error
Cannot read property "Swiper" of undefined
TypeError: Cannot read property" Swiper" of undefined

at Object.e (http://127.0.0.1:50955/appservice/static/js/vendor.js:14746:23)
at t (http://127.0.0.1:50955/appservice/static/js/vendor.js:14663:97)
at Object.defineProperty.value (http://127.0.0.1:50955/appservice/static/js/vendor.js:14701:71)
at t (http://127.0.0.1:50955/appservice/static/js/vendor.js:14663:97)
at Object.defineProperty.value (http://127.0.0.1:50955/appservice/static/js/vendor.js:14714:17)
at t (http://127.0.0.1:50955/appservice/static/js/vendor.js:14663:97)
at t.exports (http://127.0.0.1:50955/appservice/static/js/vendor.js:14676:23)
at http://127.0.0.1:50955/appservice/static/js/vendor.js:14677:8
at n (http://127.0.0.1:50955/appservice/static/js/vendor.js:14659:31)
at Object._ (http://127.0.0.1:50955/appservice/static/js/vendor.js:14660:6) 

dei
Mar.01,2021

I haven't done it. I suggest giving up.

I have used swiper, which is basically based on DOM; Mini Program, I have also used it, basically does not open the DOM interface-- because its goal is "quasi-native effects", it is bound to add more and more native content in the future. So it's hard to reconcile the two. This is different from pure JS libraries such as Bluebird, which are fine as long as they are consistent at run time.

in addition, it is suggested to communicate upward to PM. Mini Program called it "unsound" at best, but the bad thing is. It is completely impossible to achieve what you want, and you have to make a choice. You will step into more holes next, so be prepared for demotion in advance.

Menu