From 6910c691f79f704e28ddcdf5b657c4a4e038f4f5 Mon Sep 17 00:00:00 2001 From: Guillermo Sagar Date: Thu, 16 Jul 2026 09:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A8=E7=94=BB=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E7=99=BD=E5=B1=8FBug=20(#8148)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 首次页面加载正常,但是当通过页面点击切换路由的时候白屏,无法正常渲染子页面 Vue Transition + KeepAlive 空白页 bug**: `` + 条件渲染会导致路由切换空白页。`mode="out-in"` 要求旧元素完成 leave 动画后新元素才进入,但路由切换时条件渲染可能在动画前就移除了旧元素,导致 `` 永远等待一个不存在的元素 → 死锁。**解决方案**: 移除 `mode="out-in"`(保留 Transition 动画),或在 `apps/web-antd/src/preferences.ts` 设置 `transition: { enable: false }` 关闭动画走 `v-else` 分支。 --- packages/effects/layouts/src/basic/content/content.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/effects/layouts/src/basic/content/content.vue b/packages/effects/layouts/src/basic/content/content.vue index 2d6bb916a..f7ab347db 100644 --- a/packages/effects/layouts/src/basic/content/content.vue +++ b/packages/effects/layouts/src/basic/content/content.vue @@ -44,7 +44,6 @@ const showComponent = (route: RouteLocationNormalizedLoadedGeneric) => { v-if="getEnabledTransition" :name="getTransitionName(route)" appear - mode="out-in" >