原文:vue3+echart5 遇到的坑 Cannot read properties of undefined (reading 'type')

错误说明 vue 中,使用data的方式初始化echart图表 在窗口大小发生变化时,需要执行this.chart.resize 动态调整图表的大小,发生错误: 错误原因 vue 中使用proxy的方式监听响应式,this.chart会被在vue内部转换成响应式对象,从而在resize 的时候获取不到 coordSys.type 解决方案 参考官方: 你可以有选择地退出默认的深度响应式 只读转换模 ...

2021-09-27 14:52 1 7995 推荐指数:

查看详情

TypeError: Cannot read properties of undefined (reading 'templateName')

封装了一个组件,刚开始一直没有报错,后面添加数据之后就开始报错了 TypeError: Cannot read properties of undefined (reading 'templateName') 当我新增的时候一直报错,修改就不报错,我一直是以为el-tab-pane引起 ...

Fri Jan 07 18:47:00 CST 2022 0 9580
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM