perf: 优化iframe缓存 (#879)

This commit is contained in:
otis 2024-01-22 21:37:30 +08:00 committed by GitHub
parent b13d745474
commit c5e280307e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
}
);