mirror of
https://github.com/dataease/dataease.git
synced 2025-09-08 15:44:32 +08:00
fix(图表): 优化移动端跳转问题 (#16898)
This commit is contained in:
parent
6eca8d59b1
commit
b1fc6ce8cb
2 changed files with 16 additions and 1 deletions
|
@ -339,8 +339,14 @@ const onWrapperClick = e => {
|
|||
} else {
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
if (inMobile.value) {
|
||||
window.location.reload()
|
||||
}
|
||||
} else {
|
||||
initOpenHandler(window.open(url, jumpType))
|
||||
if (inMobile.value) {
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('url 格式错误:' + url)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { onMounted, onUnmounted, reactive } from 'vue'
|
||||
import DePreview from '@/components/data-visualization/canvas/DePreview.vue'
|
||||
import router from '@/router/mobile'
|
||||
import { initCanvasDataMobile, initCanvasData } from '@/utils/canvasUtils'
|
||||
|
@ -152,6 +152,7 @@ onMounted(async () => {
|
|||
}
|
||||
dvMainStore.setEmbeddedCallBack(callBackFlag || 'no')
|
||||
dvMainStore.setPublicLinkStatus(props.publicLinkStatus)
|
||||
window.addEventListener('popstate', handlePopState)
|
||||
})
|
||||
|
||||
const initBrowserTimer = () => {
|
||||
|
@ -164,6 +165,14 @@ const initBrowserTimer = () => {
|
|||
}
|
||||
}
|
||||
|
||||
const handlePopState = () => {
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('popstate', handlePopState)
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
loadCanvasDataAsync
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue