1.npm install babel-polyfill --save
main.js头部引入babel-polyfill, import "babel-polyfill"
2.webpack.base.config.js的entry入口配置:
entry: {
main: ["babel-polyfill", "../src/main.js"]
}
3.解决iview在IE9/10报TypeError: 无法获取未定义或 null 引用的属性transfer
其原因是IE9、10不支持dataset属性导致的,所以需要在全局定义dataset属性,定义在模板index.html中即可

网友评论