fix(图表): 修复在预览状态下,下载图表图片点一次下载两次的问题

This commit is contained in:
jianneng-fit2cloud 2025-01-09 10:01:06 +08:00 committed by xuwei-fit2cloud
parent 750f549bc3
commit 7608677520
2 changed files with 6 additions and 2 deletions

View File

@ -165,8 +165,10 @@ const handleInnerMouseDown = e => {
onMounted(() => {
currentInstance = getCurrentInstance()
const methodName = 'componentImageDownload-' + config.value.id
useEmitt().emitter.off(methodName)
useEmitt({
name: 'componentImageDownload-' + config.value.id,
name: methodName,
callback: () => {
htmlToImage()
}

View File

@ -1112,8 +1112,10 @@ onMounted(() => {
// do stopAnimation
})
settingAttribute()
const methodName = 'componentImageDownload-' + element.value.id
useEmitt().emitter.off(methodName)
useEmitt({
name: 'componentImageDownload-' + element.value.id,
name: methodName,
callback: () => {
htmlToImage()
}