VUE-CLI + AntV G6 兼容IE11

阿里的流程图库 G6,不兼容IE11。官网有解决方案。

https://g6.antv.vision/zh/docs/manual/FAQ/supportIE 
但我实践下来,有点问题。

我的框架是VUE -CLI 4.1.1

1、在Vue.cofnig.js中,module.exports 中添加

transpileDependencies: ["@antv/g6"]

2、在babel.config.js中,配置:

module.exports = {
  //让G6支持IE  https://g6.antv.vision/zh/docs/manual/FAQ/supportIE 
  sourceType: 'unambiguous',
  presets: ['@vue/app'],//此处和官网不一样,官网为['@vue/cli-plugin-babel/preset']
}
 
这其中,可能要运行,vue add babel命令。
 

猜你喜欢

转载自www.cnblogs.com/wigis/p/12402601.html