DON'T use ref or reactive to wrap the echarts instance. Use a common variable or shallowRef to avoid the deep watch for echarts instance.
不要使用 ref 或 reactive 来包装 echarts 实例。使用公共变量或 shallowRef 来避免对 echarts 实例的深度监视。
<template>
<div ref='refMain' ></div>
</template>
import { shallowRef, onMounted } from 'vue';
const myChart = shallowRef();
const refMain = ref(null);
onMounted(() => {
// 获取图表容器的 DOM 元素
const chartDom = refMain.value;
// 初始化
myChart.value = echarts.init(chartDom);
});
- properties TypeError undefined Uncaught echartsproperties typeerror undefined uncaught typeerror undefined uncaught property properties typeerror undefined echarts addeventlistener typeerror uncaught property properties typeerror undefined reading typeerror non-mysql undefined property typeerror undefined property cannot typeerror undefined property webpack typeerror undefined property upgrade emitsoptions properties typeerror uncaught