From 9bdc45812c10b8b8c7e03af99b04e080ae0bc4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Sun, 10 Aug 2025 17:02:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20@tiptap/extension-placehol?= =?UTF-8?q?der=20=E6=89=A9=E5=B1=95=EF=BC=8C=E6=9B=B4=E6=96=B0=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E7=BC=96=E8=BE=91=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E9=87=8D=E6=9E=84=E5=88=86=E9=95=9C?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E4=BB=A5=E6=94=AF=E6=8C=81=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=8A=A0=E8=BD=BD=E8=A7=92=E8=89=B2=E5=92=8C=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E5=86=85=E5=AE=B9=EF=BC=8C=E4=BC=98=E5=8C=96=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=92=AD=E6=94=BE=E6=8E=A7=E5=88=B6=E5=92=8C=E5=88=86?= =?UTF-8?q?=E9=95=9C=E6=8F=8F=E8=BF=B0=E7=9A=84=E6=98=BE=E7=A4=BA=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/work-flow/use-edit-data.tsx | 16 +- components/ui/edit-modal.tsx | 5 +- components/ui/person-detection.tsx | 1 + components/ui/shot-editor/ShotEditor.tsx | 60 +- components/ui/shot-editor/ShotsEditor.tsx | 101 ++- components/ui/shot-tab-content.tsx | 43 +- package-lock.json | 661 ++----------------- package.json | 1 + 8 files changed, 129 insertions(+), 759 deletions(-) diff --git a/components/pages/work-flow/use-edit-data.tsx b/components/pages/work-flow/use-edit-data.tsx index 32181c5..5b28a82 100644 --- a/components/pages/work-flow/use-edit-data.tsx +++ b/components/pages/work-flow/use-edit-data.tsx @@ -75,20 +75,19 @@ export const useEditData = (tabType: string) => { const searchParams = useSearchParams(); const projectId = searchParams.get('episodeId') || ''; const [loading, setLoading] = useState(true); - const [shotData, setShotData] = useState(mockShotData); + const [shotData, setShotData] = useState([]); const { videoSegments, getVideoSegmentList, setSelectedSegment, - regenerateVideoSegment + regenerateVideoSegment, + filterRole } = useShotService(); useEffect(() => { if (tabType === 'shot') { getVideoSegmentList(projectId).then(() => { - console.log('useEditData-----videoSegments', videoSegments); - // setShotData(videoSegments); setLoading(false); }).catch((err) => { console.log('useEditData-----err', err); @@ -96,13 +95,18 @@ export const useEditData = (tabType: string) => { setLoading(false); }); } - }, [tabType]); + useEffect(() => { + console.log('useEditData-----videoSegments', videoSegments); + setShotData(videoSegments); + }, [videoSegments]); + return { loading, shotData, setSelectedSegment, - regenerateVideoSegment + regenerateVideoSegment, + filterRole } } \ No newline at end of file diff --git a/components/ui/edit-modal.tsx b/components/ui/edit-modal.tsx index af5fe86..7bfed3a 100644 --- a/components/ui/edit-modal.tsx +++ b/components/ui/edit-modal.tsx @@ -33,7 +33,7 @@ const tabs = [ { id: '0', label: 'Script', icon: FileText }, { id: '1', label: 'Character', icon: Users }, { id: '2', label: 'Scene', icon: Image }, - { id: '3', label: 'Shot', icon: Video }, + { id: '3', label: 'Video', icon: Video }, { id: '4', label: 'Music', icon: Music }, // { id: '5', label: '剪辑', icon: Scissors }, { id: 'settings', label: 'Settings', icon: Settings }, @@ -124,10 +124,7 @@ export function EditModal({ case '3': return ( ); diff --git a/components/ui/person-detection.tsx b/components/ui/person-detection.tsx index 8274d09..271287f 100644 --- a/components/ui/person-detection.tsx +++ b/components/ui/person-detection.tsx @@ -187,6 +187,7 @@ export const PersonDetectionScene: React.FC = ({ {videoSrc && (