Commit b259a495 authored by 陈龙's avatar 陈龙

feat: 修复初始进入时就开始下载图表图片

parent b84b3c50
...@@ -78,7 +78,7 @@ const SingleChart = memo((props) => { ...@@ -78,7 +78,7 @@ const SingleChart = memo((props) => {
return _option; return _option;
}, [dataSource, smooth, curveCenter, chartType, predicateData]); }, [dataSource, smooth, curveCenter, chartType, predicateData]);
useEffect(() => { useEffect(() => {
if (exportCanvas) { if (exportCanvas.exportFlag) {
const chart = chartRef.current?.getEchartsInstance?.(); const chart = chartRef.current?.getEchartsInstance?.();
let a = document.createElement('a'); let a = document.createElement('a');
a.href = chart.getDataURL('image/png'); a.href = chart.getDataURL('image/png');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment