Open reeshuai opened 2 years ago
I have same problem use vue2 and echarts5.3.2 OS:iphone ios 12.0.1
我使用的是 Vue3 和 GaugeChart 图表,设备有 iPhone8 13.5.1、iPhone XR 14.4.1、iPhone 13 Pro Max 15.4.1
经过测试发现,在不同ios版本、echarts版本、echarts引入方式的情况下表现均有不同:
echarts 版本5.3.2 全局引入和按需引入:ios13 和 ios 14 报错,ios15 正常 echarts 版本5.2.2 以及 5.0.2 全局引入:全部正常 echarts 版本5.2.2 以及 5.0.2 按需引入:ios13 和 ios 14 报错,ios15 正常
我最近也碰到了同样的问题, echarts 版本5.1.1 按需引入:ios13 和 ios 14 报错,ios15 正常
我最近也碰到了同样的问题, echarts 版本5.1.1 按需引入:ios13 和 ios 14 报错,ios15 正常
今天找到解决办法了,不过只适用于使用webpack 4版本的。 问题原因:是因为vue.config.js里配置的是低版本的TerserPlugin插件,并且使用 paralleUglifyPlugin 进行压缩打包,而根据terser github文档里的描述,uglify是不支持ES6+的,所以大家可以排查下自己的项目打包是不是使用了uglify。
uglify-js does not support ES6+.
解决方法: 对于webpack 4的,将TerserPlugin升级到对应版本(4.x.x),去除uglify打包,根据这里的指引配置TerserPlugin
目前我这样操作后,问题就解决了。
这个问题解决了吗?5.4的版本ios也出现了这个问题
Version
5.3.1
Link to Minimal Reproduction
No response
Steps to Reproduce
Current Behavior
The following issues occur just on iPhone (ios 14.4),other phones and browsers run without problems
Expected Behavior
Environment
Any additional comments?
I guess there is a problem with the compiled code. It should be a compatibility problem after compiling the code, but I don't know how to fix it.
source code: node_modules\echarts\lib\model\Global.js
compiled code: