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