Просмотр исходного кода

修复内嵌链接不显示问题

yanglzh 3 лет назад
Родитель
Сommit
ba1187a7d3
3 измененных файлов с 6 добавлено и 5 удалено
  1. 4 4
      src/layout/routerView/iframes.vue
  2. 1 0
      src/router/backEnd.ts
  3. 1 1
      src/store/modules/themeConfig.ts

+ 4 - 4
src/layout/routerView/iframes.vue

@@ -1,7 +1,7 @@
 <template>
-	<div class="layout-view-bg-white flex mt1" :style="{ height: `calc(100vh - ${setIframeHeight}`, border: 'none' }" v-loading="iframeLoading">
-		<iframe :src="iframeUrl" frameborder="0" height="100%" width="100%" id="iframe" v-show="!iframeLoading"></iframe>
-	</div>
+  <div class="layout-view-bg-white flex mt1" :style="{ height: `calc(100vh - ${setIframeHeight}`, border: 'none' }" v-loading="iframeLoading">
+    <iframe :src="iframeUrl" frameborder="0" height="100%" width="100%" id="iframe" v-show="!iframeLoading"></iframe>
+  </div>
 </template>
 
 <script lang="ts">
@@ -19,7 +19,7 @@ export default defineComponent({
 		});
 		// 初始化页面加载 loading
 		const initIframeLoad = () => {
-			state.iframeUrl = <any>route.meta?.isLink;
+			state.iframeUrl = <any>route.meta?.linkUrl;
 			nextTick(() => {
 				state.iframeLoading = true;
 				const iframe = document.getElementById('iframe');

+ 1 - 0
src/router/backEnd.ts

@@ -90,6 +90,7 @@ export function backEndComponent(routes: any) {
 			isIframe: item.isIframe,
 			isKeepAlive: item.isKeepAlive,
 			isLink: item.isLink,
+			linkUrl: item.linkUrl,
 			title: item.title,
 		}
 		return item;

+ 1 - 1
src/store/modules/themeConfig.ts

@@ -84,7 +84,7 @@ const themeConfigModule: Module<ThemeConfigState, RootStateTypes> = {
 			// 是否开启 TagsView 共用
 			isShareTagsView: false,
 			// 是否开启 Footer 底部版权信息
-			isFooter: true,
+			isFooter: false,
 			// 是否开启灰色模式
 			isGrayscale: false,
 			// 是否开启色弱模式