forked from github/dataease
fix(仪表板): 修复浏览器整体刷新移动端未生效问题
This commit is contained in:
parent
d5a180c20c
commit
ae4dc7e0cf
@ -119,6 +119,7 @@ const loadCanvasDataAsync = async (dvId, dvType) => {
|
|||||||
document.title = dvInfo.name
|
document.title = dvInfo.name
|
||||||
setTitle(dvInfo.name)
|
setTitle(dvInfo.name)
|
||||||
}
|
}
|
||||||
|
initBrowserTimer()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -139,6 +140,16 @@ onMounted(async () => {
|
|||||||
dvMainStore.setPublicLinkStatus(props.publicLinkStatus)
|
dvMainStore.setPublicLinkStatus(props.publicLinkStatus)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const initBrowserTimer = () => {
|
||||||
|
if (state.canvasStylePreview.refreshBrowserEnable) {
|
||||||
|
const gap = state.canvasStylePreview.refreshBrowserUnit === 'minute' ? 60 : 1
|
||||||
|
const browserRefreshTime = state.canvasStylePreview.refreshBrowserTime * gap * 1000
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.reload()
|
||||||
|
}, browserRefreshTime)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
loadCanvasDataAsync
|
loadCanvasDataAsync
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user