vue-awesome-swiper兼容ie9

轮播插件vue-awesome-swiper在ie9中运行的时候没效果

解决方法:

vue-awesome-swiper在IE9下报错, 主要原因是element.classlist.add()方法在ie9中是不支持的。 解决方法是加个ployfill

npm install classlist-polyfill --save

npm install  babel-polyfill  --save

在webpack.base.conf.js中 加入classlist-polyfill

修改 module.exports    entry 如下:

module.exports = {

// app: './src/main.js'

entry: { app: ['classlist-polyfill', 'babel-polyfill', './src/main.js']}

}

来源:https://www.jianshu.com/p/b578ab0cab7a

猜你喜欢

转载自www.cnblogs.com/baixinL/p/11930220.html