ソースを参照

表单的图表

ZaiZai 2 年 前
コミット
8dcc290f7c
1 ファイル変更9 行追加1 行削除
  1. 9 1
      src/components/plugins/table-form/echart.vue

+ 9 - 1
src/components/plugins/table-form/echart.vue

@@ -73,9 +73,17 @@ const onResize = () => {
     })
 }
 
+const getImage = () => {
+    return chart.getDataURL({
+        type: 'png',
+        pixelRatio: 2
+    });
+}
+
 // 暴露出去
 defineExpose({
-    onResize
+    onResize,
+    getImage
 })
 </script>