fix: 修复tab中图表提示重复问题

This commit is contained in:
wangjiahao
2025-06-25 17:24:23 +08:00
committed by 王嘉豪
parent f9a7407eeb
commit 1978325f44

View File

@@ -624,6 +624,13 @@ const viewToolTipsChangeDebounce = debounce(() => {
viewToolTipsChange()
}, 500)
watch(
() => scale.value,
() => {
viewToolTipsChangeDebounce()
}
)
watch(
() => element.value,
() => {
@@ -670,6 +677,7 @@ const initCarousel = () => {
}
onMounted(() => {
document.addEventListener('visibilitychange', viewToolTipsChange)
if (element.value.propValue.length > 0) {
element.value.editableTabsValue = element.value.propValue[0].name
}
@@ -689,6 +697,7 @@ onMounted(() => {
}, 1000)
})
onBeforeUnmount(() => {
document.removeEventListener('visibilitychange', viewToolTipsChange)
if (['canvas', 'canvasDataV', 'edit'].includes(showPosition.value) && !mobileInPc.value) {
eventBus.off('onTabMoveIn-' + element.value.id, componentMoveIn)
eventBus.off('onTabMoveOut-' + element.value.id, componentMoveOut)