echarts:ReferenceError: echarts is not defined 已解决
echarts资源引用正常,但却出现定义报错。


原因:引入echarts.js位置不正确,导致未引入js时,却使用了echarts。
解决:先引入echarts.js再使用

建议将引入放在body后,否则可能会出现 > TypeError: Cannot read properties of null (reading 'getAttribute')
echarts资源引用正常,但却出现定义报错。


原因:引入echarts.js位置不正确,导致未引入js时,却使用了echarts。
解决:先引入echarts.js再使用

建议将引入放在body后,否则可能会出现 > TypeError: Cannot read properties of null (reading 'getAttribute')