摘要: 按需引入 1. 专门设置一个echarts配置文件,文件路径src/lib/echart.js (1.12M) ```src/lib/echart.js // 直接引用 import echarts from '@/lib/echart.js' ``` 2. 利用 babel-plugin-equi 阅读全文
posted @ 2020-12-23 18:12 doublealoe 阅读(1651) 评论(0) 推荐(0) 编辑
摘要: 添加echarts 后,启动项目, 图出不来, 且控制台报错 [Vue warn]: Error in nextTick: "TypeError: Cannot read property 'init' of undefined" 解决: Echarts 版本过高导致, 将echarts 版本从5. 阅读全文
posted @ 2020-12-23 14:45 doublealoe 阅读(4151) 评论(0) 推荐(0) 编辑
摘要: const calculateSize = (imageUrl) => { return new Promise((resolve, reject) => { const img = new Image() img.onload = () => resolve({ width: img.width, 阅读全文
posted @ 2020-12-23 10:26 doublealoe 阅读(648) 评论(0) 推荐(0) 编辑