修复默认关闭Tags-Views时,内链页面打不开

This commit is contained in:
RuoYi 2024-11-27 19:51:39 +08:00
parent 49ee5c8d81
commit c1861ddb43
2 changed files with 15 additions and 4 deletions

View File

@ -15,7 +15,22 @@
import iframeToggle from "./IframeToggle/index"
import useTagsViewStore from '@/store/modules/tagsView'
const route = useRoute()
const tagsViewStore = useTagsViewStore()
onMounted(() => {
addIframe()
})
watch((route) => {
addIframe()
})
function addIframe() {
if (route.meta.link) {
useTagsViewStore().addIframeView(route)
}
}
</script>
<style lang="scss" scoped>

View File

@ -150,11 +150,7 @@ function addTags() {
const { name } = route
if (name) {
useTagsViewStore().addView(route)
if (route.meta.link) {
useTagsViewStore().addIframeView(route);
}
}
return false
}
function moveToCurrentTag() {