Eyelly Wu

Results 21 comments of Eyelly Wu

嗯,我用项目中的taro-echarts-example示例测了下,感觉还ok的,你可以在你的环境跑下这个示例来试一下看有没有问题呢 ![1578285301703](https://user-images.githubusercontent.com/24505069/71795495-66183b80-3081-11ea-9f6e-095313c5bfcb.gif) 在line(折线图)这个示例中复制,粘贴代码就可以 ![image](https://user-images.githubusercontent.com/24505069/71795734-84326b80-3082-11ea-953c-5c4d6a1e7da7.png)

![image](https://user-images.githubusercontent.com/24505069/69153789-d0007400-0b19-11ea-8306-87401b770fe3.png) 建议提可以完善下这个模板中的内容

微信小程序报错是打包的时候报错还是运行时候报错呢

哦哦,大致了解了,由于我好长时间没有做Taro项目了,我先给个解决方案,你来测试ok不 这是echarts-for-weixin项目给出的[文件过大解决方案](https://github.com/ecomfe/echarts-for-weixin#%E6%96%87%E4%BB%B6%E5%A4%AA%E5%A4%A7%E6%80%8E%E4%B9%88%E5%8A%9E),就是去[定制](https://www.echartsjs.com/zh/builder.html)我们需要的图表,下载保存在我们项目的某个位置 然后修改Taro的配置, ``` patterns: [ // 之前写的复制配置,忽略echarts.js { from: 'node_modules/taro-echarts/components/ec-canvas/', to: 'dist/npm/taro-echarts/components/ec-canvas', ignore: ['ec-canvas.js', 'wx-canvas.js','echarts.js'] }, // 添加新的copy规则,将 { from: '保存定制echarts的路径', to: 'dist/npm/taro-echarts/components/ec-canvas', } ] ``` 你可以试试看

定制的echarts文件应该小很多了吧?难道是copy配制没生效?现在小程序中的echarts是你定制的echarts吗

那报错怎么还超过500k呢?

我测试是ok的啊 copy配置 ![image](https://user-images.githubusercontent.com/24505069/70846010-108cac80-1e90-11ea-85c8-361b7b271749.png) 生成的小程序代码中,echarts也的确是定制的 ![image](https://user-images.githubusercontent.com/24505069/70846048-5f3a4680-1e90-11ea-8fb3-56c20b281536.png) 定制的echarts文件 ![image](https://user-images.githubusercontent.com/24505069/70846066-86911380-1e90-11ea-9f8b-c64b8c1f4ac2.png) @vinurs 你生成的小程序代码中的echarts不是自己定制的吗?