forked from github/dataease
Merge pull request #12202 from dataease/pr@dev-v2@fix_mobile-refresh
fix(仪表板): 修复浏览器整体刷新移动端未生效问题
This commit is contained in:
commit
76cd854929
@ -119,6 +119,7 @@ const loadCanvasDataAsync = async (dvId, dvType) => {
|
||||
document.title = dvInfo.name
|
||||
setTitle(dvInfo.name)
|
||||
}
|
||||
initBrowserTimer()
|
||||
}
|
||||
)
|
||||
}
|
||||
@ -139,6 +140,16 @@ onMounted(async () => {
|
||||
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({
|
||||
loadCanvasDataAsync
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user