Browse Source

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

master
insistence 2 months ago
parent
commit
8f851f5e51
  1. 15
      ruoyi-fastapi-frontend/src/layout/components/AppMain.vue
  2. 4
      ruoyi-fastapi-frontend/src/layout/components/TagsView/index.vue

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

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

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

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

Loading…
Cancel
Save