Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目要运行在 IE 11 上,能提供一个编译到兼容 IE11 的版本么 🤔 [QUESTION] #158

Open
shushu2013 opened this issue Apr 9, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@shushu2013
Copy link

项目引用 https://unpkg.com/@antv/l7plot@latest/dist/umd/l7plot.min.js

运行在 IE 11 上,报错了 “Symbol”未定义,IE11 不支持该 ES6 语法

需要做什么改动 L7Plot 才能支持啊,能提供一个编译到兼容 IE11 的版本么

@lvisei
Copy link
Member

lvisei commented Apr 9, 2022

提供 npm 安装,项目自行 babel 语法兼容打包吧。提供浏览器引入的 umd 方式后面可能发一个版本支持 IE11
@shushu2013

@lvisei lvisei added the help wanted Extra attention is needed label Apr 9, 2022
@shushu2013
Copy link
Author

shushu2013 commented Apr 13, 2022

加了一些 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants