vue3 + echarts5 使用问题汇总
1. Cannot read properties of undefined (reading 'type')
原因:定义图表变量时使用reactive定义响应式变量。
const chartList = reactive({
chart1: null
});
解决:改为非响应式变量。
// 方法一
const chartList = markRaw({
chart1: null
});
// 方法二
const chartList = {
chart1: null
};
// 方法三
const chart1 = null;

浙公网安备 33010602011771号