mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-16 03:45:07 +08:00
营销:完善装修编辑器重置功能
This commit is contained in:
@ -20,6 +20,17 @@ const getCaches = computed((): string[] => {
|
||||
})
|
||||
|
||||
const tagsView = computed(() => appStore.getTagsView)
|
||||
|
||||
//region 无感刷新
|
||||
const routerAlive = ref(true)
|
||||
// 无感刷新,防止出现页面闪烁白屏
|
||||
const reload = () => {
|
||||
routerAlive.value = false
|
||||
nextTick(() => (routerAlive.value = true))
|
||||
}
|
||||
// 为组件后代提供刷新方法
|
||||
provide('reload', reload)
|
||||
//endregion
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -49,7 +60,7 @@ const tagsView = computed(() => appStore.getTagsView)
|
||||
}
|
||||
]"
|
||||
>
|
||||
<router-view>
|
||||
<router-view v-if="routerAlive">
|
||||
<template #default="{ Component, route }">
|
||||
<keep-alive :include="getCaches">
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
|
Reference in New Issue
Block a user