Skip to content

Commit

Permalink
fix(client): force refresh iframe view when toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Dec 19, 2023
1 parent 12247e7 commit 1973cae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/client/src/pages/custom-tab-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ onMounted(() => {
}, 2000)
}
})
const iframeViewVisible = ref(true)
watch(() => route.params.name, () => {
iframeViewVisible.value = false
setTimeout(() => {
iframeViewVisible.value = true
}, 100)
})
</script>

<template>
Expand All @@ -32,7 +40,7 @@ onMounted(() => {
</PanelGrids>
</template>
<template v-else-if="tab?.view?.type === 'iframe'">
<IframeView :src="tab.view.src" />
<IframeView v-if="iframeViewVisible" :src="tab.view.src" />
</template>
<template v-else>
<PanelGrids>
Expand Down

0 comments on commit 1973cae

Please sign in to comment.