From c5e280307e9ea652fd7b5e8771283e23a6b5ba5b Mon Sep 17 00:00:00 2001 From: otis <33190365+o-cc@users.noreply.github.com> Date: Mon, 22 Jan 2024 21:37:30 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96`iframe`=E7=BC=93?= =?UTF-8?q?=E5=AD=98=20(#879)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/frameView.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/layout/frameView.vue b/src/layout/frameView.vue index c7c9719d8..7e7725c05 100644 --- a/src/layout/frameView.vue +++ b/src/layout/frameView.vue @@ -48,14 +48,17 @@ function init() { watch( () => currentRoute.fullPath, path => { + if ( + currentRoute.name === "Redirect" && + path.includes(props.frameInfo?.fullPath) + ) { + frameSrc.value = path; // redirect时,置换成任意值,待重定向后 重新赋值 + loading.value = true; + } + // 重新赋值 if (props.frameInfo?.fullPath === path) { frameSrc.value = props.frameInfo?.frameSrc; } - // 重新加载 - if (path.indexOf("/redirect/") > -1) { - frameSrc.value = props.frameInfo?.fullPath; - loading.value = true; - } } );