预加载和适配屏幕修复

This commit is contained in:
mtvpls
2026-04-17 11:03:18 +08:00
parent d3b267380f
commit 496c0683c1
3 changed files with 53 additions and 8 deletions
+4
View File
@@ -16,6 +16,8 @@ const ProxyImage: React.FC<ProxyImageProps> = ({
displaySrc,
retryDelay = 2000,
retryOnError = true,
loading = 'lazy',
decoding = 'async',
onError,
src: _src,
...props
@@ -41,6 +43,8 @@ const ProxyImage: React.FC<ProxyImageProps> = ({
<img
{...props}
src={displaySrc || processImageUrl(originalSrc)}
loading={loading}
decoding={decoding}
onError={handleError}
/>
);
+4 -2
View File
@@ -151,8 +151,10 @@ export default function MangaLayout({ children }: MangaLayoutProps) {
</header>
<main
className={`mx-auto max-w-7xl px-3 pt-20 sm:px-6 sm:pt-24 ${
isReadingPage ? 'pb-24 sm:pb-28 lg:pb-10' : 'pb-[calc(5rem+env(safe-area-inset-bottom))] sm:pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-10'
className={`mx-auto max-w-7xl pt-20 sm:pt-24 ${
isReadingPage
? 'px-0 pb-24 sm:px-0 sm:pb-28 lg:pb-10'
: 'px-3 pb-[calc(5rem+env(safe-area-inset-bottom))] sm:px-6 sm:pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-10'
}`}
>
{children}