fix 修复 部分问题

This commit is contained in:
疯狂的狮子Li 2023-12-14 00:35:00 +08:00
parent 1f71044cff
commit 0541af5abb
2 changed files with 9 additions and 11 deletions

View File

@ -1,13 +1,11 @@
<template> <template>
<transition-group name="fade-transform" mode="out-in"> <inner-link
<inner-link v-for="(item, index) in tagsViewStore.iframeViews"
v-for="(item, index) in tagsViewStore.iframeViews" v-show="route.path === item.path"
v-show="route.path === item.path" :key="item.path"
:key="item.path" :iframe-id="'iframe' + index"
:iframe-id="'iframe' + index" :src="iframeUrl(item.meta ? item.meta.link : '', item.query)"
:src="iframeUrl(item.meta ? item.meta.link : '', item.query)" ></inner-link>
></inner-link>
</transition-group>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -17,7 +15,7 @@ import useTagsViewStore from '@/store/modules/tagsView';
const route = useRoute(); const route = useRoute();
const tagsViewStore = useTagsViewStore(); const tagsViewStore = useTagsViewStore();
function iframeUrl(url: string, query: any) { function iframeUrl(url: string | undefined, query: any) {
if (Object.keys(query).length > 0) { if (Object.keys(query).length > 0) {
let params = Object.keys(query) let params = Object.keys(query)
.map((key) => key + '=' + query[key]) .map((key) => key + '=' + query[key])

View File

@ -123,7 +123,7 @@ watch(isDark, () => {
}); });
const toggleDark = () => useToggle(isDark); const toggleDark = () => useToggle(isDark);
const topNavChange = (val) => { const topNavChange = (val: any) => {
if (!val) { if (!val) {
appStore.toggleSideBarHide(false); appStore.toggleSideBarHide(false);
permissionStore.setSidebarRouters(permissionStore.defaultRoutes); permissionStore.setSidebarRouters(permissionStore.defaultRoutes);