feat(PageTransition): enhance layer management to prevent blank flashes during transitions

This commit is contained in:
LTbinglingfeng
2026-02-01 02:18:14 +08:00
parent f0735dbc1e
commit 237cca5680
3 changed files with 47 additions and 8 deletions

View File

@@ -29,6 +29,18 @@
&--stacked {
display: none;
// Keep the previous layer rendered (but invisible) to avoid a blank flash when popping back.
// Older stacked layers remain `display: none` for performance.
&.page-transition__layer--stacked-keep {
display: flex;
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
opacity: 0;
will-change: transform, opacity;
}
}
}
@@ -36,7 +48,7 @@
will-change: transform, opacity;
}
&--animating &__layer:not(.page-transition__layer--exit) {
&--animating &__layer:not(.page-transition__layer--exit):not(.page-transition__layer--stacked) {
position: relative;
}
}