Skip to content

Commit 8f851f5

Browse files
committed
fix: 修复默认关闭Tags-Views时,内链页面打不开
1 parent 29b672c commit 8f851f5

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

ruoyi-fastapi-frontend/src/layout/components/AppMain.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,22 @@
1515
import iframeToggle from "./IframeToggle/index"
1616
import useTagsViewStore from '@/store/modules/tagsView'
1717
18+
const route = useRoute()
1819
const tagsViewStore = useTagsViewStore()
20+
21+
onMounted(() => {
22+
addIframe()
23+
})
24+
25+
watch((route) => {
26+
addIframe()
27+
})
28+
29+
function addIframe() {
30+
if (route.meta.link) {
31+
useTagsViewStore().addIframeView(route)
32+
}
33+
}
1934
</script>
2035

2136
<style lang="scss" scoped>

ruoyi-fastapi-frontend/src/layout/components/TagsView/index.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,7 @@ function addTags() {
141141
const { name } = route
142142
if (name) {
143143
useTagsViewStore().addView(route)
144-
if (route.meta.link) {
145-
useTagsViewStore().addIframeView(route);
146-
}
147144
}
148-
return false
149145
}
150146
function moveToCurrentTag() {
151147
nextTick(() => {

0 commit comments

Comments
 (0)