We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
uniapp 环境打包 h5。会注入 wx 全局变量。导致zrender 判断认为微信环境,从而引起echarts 功能异常
The text was updated successfully, but these errors were encountered:
建议加上 uni 判断,或者其他Env 判断方式。避免wx 污染从而引起判断bug
Sorry, something went wrong.
临时解决方案。import 改为 require 方式。加入如下 hack 代码
let fn = null; if (typeof uni !== "undefined" && typeof wx !== "undefined") { fn = wx.getSystemInfoSync; wx.getSystemInfoSync = null; } const echarts = require("echarts"); if (fn) { wx.getSystemInfoSync = fn; fn = null; }
添加这段代码问题依旧。
No branches or pull requests
uniapp 环境打包 h5。会注入 wx 全局变量。导致zrender 判断认为微信环境,从而引起echarts 功能异常
The text was updated successfully, but these errors were encountered: