Jelajahi Sumber

表单的图表

ZaiZai 2 tahun lalu
induk
melakukan
8dcc290f7c
1 mengubah file dengan 9 tambahan dan 1 penghapusan
  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>