mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
fix(图表): 修复弹窗跳转后提示还会留在页面的问题 #17513
This commit is contained in:
committed by
jianneng-fit2cloud
parent
0370c01c1a
commit
3ebe911d5f
@@ -24,11 +24,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { useEmbedded } from '@/store/modules/embedded'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import ChartCarouselTooltip from '@/views/chart/components/js/g2plot_tooltip_carousel'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { canvasStyleData } = storeToRefs(dvMainStore)
|
||||
const state = reactive({
|
||||
@@ -84,6 +85,16 @@ const previewInit = params => {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 监听弹窗显示隐藏,控制tooltip显示隐藏,避免遮挡弹窗
|
||||
watch(
|
||||
() => state.dialogShow,
|
||||
show => {
|
||||
document.querySelectorAll('.g2-tooltip')?.forEach(tooltip => {
|
||||
tooltip.classList.toggle('hidden-tooltip', show)
|
||||
})
|
||||
if (!show) ChartCarouselTooltip.closeEnlargeDialogDestroy()
|
||||
}
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
previewInit
|
||||
|
||||
Reference in New Issue
Block a user