fix: 电商页面 KeepAlive 容器使用绝对定位铺满视口,解决底部留白问题
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+9
-7
@@ -1234,10 +1234,13 @@ function App() {
|
||||
<PageTransition viewKey={activeView}>
|
||||
{activePage}
|
||||
</PageTransition>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
|
||||
{/* KeepAlive: EcommercePage stays mounted once visited */}
|
||||
{ecommerceEverMounted && (
|
||||
<div style={{ display: isEcommerceActive ? undefined : "none" }}>
|
||||
{/* KeepAlive: EcommercePage stays mounted once visited, hidden via display:none */}
|
||||
{ecommerceEverMounted && (
|
||||
<div className="keepalive-ecommerce" style={{ display: isEcommerceActive ? undefined : "none" }}>
|
||||
<Suspense fallback={null}>
|
||||
<EcommercePage
|
||||
projects={projects}
|
||||
isAuthenticated={Boolean(session)}
|
||||
@@ -1250,10 +1253,9 @@ function App() {
|
||||
initialTemplate={pendingEcommerceTemplate}
|
||||
onInitialTemplateConsumed={() => setPendingEcommerceTemplate(null)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
</Suspense>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{loginPromptOpen && pendingAction ? (
|
||||
<div className="login-gate-modal" role="dialog" aria-modal="true" aria-labelledby="login-gate-title">
|
||||
|
||||
Reference in New Issue
Block a user