Merge pull request #12326 from dataease/pr@dev-v2@fix_mobile-jump

fix(数据大屏、仪表板): 修复部分仪表板图表跳转当前页面内部链接在移动端无法打开问题
This commit is contained in:
王嘉豪 2024-09-20 13:06:11 +08:00 committed by GitHub
commit 4a7ab6185c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,8 +69,15 @@ const isIframe = computed(() => appStore.getIsIframe)
const emit = defineEmits(['onPointClick'])
const { nowPanelJumpInfo, publicLinkStatus, dvInfo, curComponent, canvasStyleData, mobileInPc } =
storeToRefs(dvMainStore)
const {
nowPanelJumpInfo,
publicLinkStatus,
dvInfo,
curComponent,
canvasStyleData,
mobileInPc,
inMobile
} = storeToRefs(dvMainStore)
const props = defineProps({
active: {
@ -398,11 +405,16 @@ const windowsJump = (url, jumpType, size = 'middle') => {
const width = screen.width * sizeX
const left = screen.width * ((1 - sizeX) / 2)
const top = screen.height * ((1 - sizeY) / 2)
window.open(
newWindow = window.open(
url,
'_blank',
`width=${width},height=${height},left=${left},top=${top},toolbar=no,scrollbars=yes,resizable=yes,location=no`
)
} else if ('_self' === jumpType) {
newWindow = window.open(url, jumpType)
if (inMobile) {
window.location.reload()
}
} else {
newWindow = window.open(url, jumpType)
}