L7Plot
L7Plot copied to clipboard
项目要运行在 IE 11 上,能提供一个编译到兼容 IE11 的版本么 🤔 [QUESTION]
项目引用 https://unpkg.com/@antv/l7plot@latest/dist/umd/l7plot.min.js
运行在 IE 11 上,报错了 “Symbol”未定义,IE11 不支持该 ES6 语法
需要做什么改动 L7Plot 才能支持啊,能提供一个编译到兼容 IE11 的版本么
提供 npm 安装,项目自行 babel 语法兼容打包吧。提供浏览器引入的 umd 方式后面可能发一个版本支持 IE11 @shushu2013
加了一些 polyfill
可以在 IE 11 上显示了
<script type="text/javascript" src="https://npm.elemecdn.com/@babel/[email protected]/dist/polyfill.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://npm.elemecdn.com/[email protected]/dist/fetch.umd.js" crossorigin="anonymous"></script>
<script>
// 针对 antv 在 IE 11 下 remove 方法的 polyfill
if (!('remove' in Element.prototype)) {
Element.prototype['remove'] = function () {
if (this.parentNode) {
this.parentNode.removeChild(this);
}
};
}
</script>
<script type="text/javascript" src="https://npm.elemecdn.com/@antv/[email protected]/dist/g2plot.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://npm.elemecdn.com/@antv/[email protected]/dist/umd/l7plot.min.js" crossorigin="anonymous"></script>