ensure same-template views refresh data after route change
This commit is contained in:
parent
39276736da
commit
eb0ddfcc1e
1 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,7 @@ let routeConfig = routeStore._routes[currentRoute.path]
|
|||
let rememberWarning = false
|
||||
|
||||
const ready = ref(false)
|
||||
const firstInit = ref(false)
|
||||
const acknowledged = ref(false)
|
||||
const storageId = ref('')
|
||||
const warning = ref({} as WarningModal)
|
||||
|
@ -83,7 +84,7 @@ const refresh = async () => {
|
|||
top: 0,
|
||||
})
|
||||
|
||||
ready.value = true
|
||||
setTimeout(() => ready.value = true)
|
||||
}
|
||||
|
||||
const onAcknowledgedWarning = () => {
|
||||
|
@ -106,6 +107,7 @@ const handlePageClosed = async (scriptUrl?: string) => {
|
|||
|
||||
onMounted(async () => {
|
||||
await refresh()
|
||||
firstInit.value = true
|
||||
determineGlobalStylesheets()
|
||||
router.afterEach(async (to, from) => {
|
||||
const oldUrl = routeConfig.scriptUrl
|
||||
|
@ -118,7 +120,7 @@ onMounted(async () => {
|
|||
<template lang="pug">
|
||||
#main-container
|
||||
header(
|
||||
v-if='ready && !!globalConfig.header'
|
||||
v-if='firstInit && !!globalConfig.header'
|
||||
)
|
||||
ul
|
||||
HeaderLink(
|
||||
|
|
Loading…
Add table
Reference in a new issue