fix(图表): 修复嵌入式div 嵌入仪表板指标卡/富文本,设置事件跳转没办法跳到另一个仪表板

This commit is contained in:
wangjiahao
2025-02-20 10:57:30 +08:00
committed by 王嘉豪
parent d2f9b3354a
commit a50c41d0b0

View File

@@ -14,6 +14,8 @@ import { activeWatermarkCheckUser, removeActiveWatermark } from '@/components/wa
import { isMobile } from '@/utils/utils'
import { isDashboard } from '@/utils/canvasUtils'
import { XpackComponent } from '@/components/plugin'
import { useAppStoreWithOut } from '@/store/modules/app'
const appStore = useAppStoreWithOut()
const componentWrapperInnerRef = ref(null)
const componentEditBarRef = ref(null)
@@ -295,6 +297,7 @@ const slotStyle = computed(() => {
const onPointClick = param => {
emits('onPointClick', param)
}
const isEmbedded = computed(() => appStore.getIsDataEaseBi || appStore.getIsIframe)
const eventEnable = computed(
() =>
@@ -319,17 +322,17 @@ const onWrapperClick = e => {
const url = config.value.events.jump.value
const jumpType = config.value.events.jump.type
try {
let newWindow
if ('newPop' === jumpType) {
window.open(
url,
'_blank',
'width=800,height=600,left=200,top=100,toolbar=no,scrollbars=yes,resizable=yes,location=no'
)
} else if ('_blank' === jumpType && isEmbedded.value) {
window.open(url, '_blank')
} else {
newWindow = window.open(url, jumpType)
initOpenHandler(window.open(url, jumpType))
}
initOpenHandler(newWindow)
} catch (e) {
console.warn('url 格式错误:' + url)
}