소스 검색

feat: Echarts组件添加打印

xieyonghong 3 년 전
부모
커밋
e659f368fd
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/components/DashBoard/echarts.tsx

+ 2 - 0
src/components/DashBoard/echarts.tsx

@@ -59,7 +59,9 @@ export default (props: EchartsProps) => {
   const chartsRef = useRef<any>(null);
   const chartsRef = useRef<any>(null);
 
 
   const initEcharts = (dom: HTMLDivElement) => {
   const initEcharts = (dom: HTMLDivElement) => {
+    console.log(chartsRef.current);
     if (!chartsRef.current) {
     if (!chartsRef.current) {
+      console.log(dom);
       chartsRef.current = echarts.init(dom);
       chartsRef.current = echarts.init(dom);
       if (props.options) {
       if (props.options) {
         chartsRef.current.setOption(props.options);
         chartsRef.current.setOption(props.options);