优化页面内嵌iframe切换tab不刷新数据

This commit is contained in:
RuoYi
2022-08-23 20:47:41 +08:00
parent 2952cb2c4f
commit 439b134c9b
6 changed files with 101 additions and 35 deletions

View File

@ -0,0 +1,19 @@
<template>
<transition-group name="fade-transform" mode="out-in">
<inner-link
v-for="(item, index) in tagsViewStore.iframeViews"
:key="item.path"
:iframeId="'iframe' + index"
v-show="route.path === item.path"
:src="item.meta.link"
></inner-link>
</transition-group>
</template>
<script setup>
import InnerLink from "../InnerLink/index"
import useTagsViewStore from '@/store/modules/tagsView'
const route = useRoute();
const tagsViewStore = useTagsViewStore()
</script>