Explorar o código

表单的图表

ZaiZai %!s(int64=2) %!d(string=hai) anos
pai
achega
8dcc290f7c
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  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>