From 57969bf4ad686e06cb602b9ad79d97bc0c764db8 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Tue, 23 Dec 2025 13:04:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BA=A0=E9=94=99=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CorrectDialog.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/CorrectDialog.tsx b/src/components/CorrectDialog.tsx index 586ef5c..0c64e6a 100644 --- a/src/components/CorrectDialog.tsx +++ b/src/components/CorrectDialog.tsx @@ -5,6 +5,7 @@ import { Search, X } from 'lucide-react'; import Image from 'next/image'; import { useEffect, useState } from 'react'; +import { createPortal } from 'react-dom'; import { getTMDBImageUrl } from '@/lib/tmdb.search'; import { processImageUrl } from '@/lib/utils'; @@ -121,7 +122,7 @@ export default function CorrectDialog({ if (!isOpen) return null; - return ( + return createPortal(
{/* 头部 */} @@ -158,7 +159,7 @@ export default function CorrectDialog({ className='px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors disabled:bg-gray-400 disabled:cursor-not-allowed flex items-center gap-2' > - {searching ? '搜索中...' : '搜索'} + {searching ? '搜索中...' : '搜索'}
{error && ( @@ -229,6 +230,7 @@ export default function CorrectDialog({ )}
- + , + document.body ); }