src/components/chat/chatComponents/hooks/useDrawChatChart.ts
@@ -16,13 +16,14 @@ resizeChart?.(width, height); }; onMounted(() => { const initChart = ()=>{ setTimeout(() => { const parent = chartRef.value.parentElement; const parentBound = parent.getBoundingClientRect(); chartInstance.value = echarts.init(chartRef.value, undefined, { width: parentBound.width, height: parentBound.height, locale: 'ZH', }); resizeChart = debounce((width, height) => { chartInstance.value.resize({ @@ -33,6 +34,10 @@ drawChart(); }, 100); } onMounted(() => { initChart(); }); return {