forked from 77media/video-flow
修复视频懒加载 未挂载问题
This commit is contained in:
parent
35318c4cb5
commit
af84fc05c7
@ -191,6 +191,7 @@ export default function CreateToVideo2() {
|
||||
const renderProjectCard = (project: any) => {
|
||||
|
||||
return (
|
||||
<LazyLoad once>
|
||||
<div
|
||||
key={project.project_id}
|
||||
className="group flex flex-col bg-black/20 rounded-lg overflow-hidden cursor-pointer hover:bg-white/5 transition-all duration-300"
|
||||
@ -201,7 +202,6 @@ export default function CreateToVideo2() {
|
||||
{/* 视频/图片区域 */}
|
||||
<div className="relative aspect-video" onClick={() => router.push(`/movies/work-flow?episodeId=${project.project_id}`)}>
|
||||
{(project.final_video_url || project.final_simple_video_url || project.video_urls) ? (
|
||||
<LazyLoad once>
|
||||
<video
|
||||
ref={(el) => setVideoRef(project.project_id, el)}
|
||||
src={project.final_video_url || project.final_simple_video_url || project.video_urls}
|
||||
@ -214,7 +214,6 @@ export default function CreateToVideo2() {
|
||||
getFirstFrame(project.final_video_url || project.final_simple_video_url || project.video_urls)
|
||||
}
|
||||
/>
|
||||
</LazyLoad>
|
||||
) : (
|
||||
<div
|
||||
className="w-full h-full bg-cover bg-center group-hover:scale-105 transition-transform duration-500"
|
||||
@ -266,6 +265,7 @@ export default function CreateToVideo2() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</LazyLoad>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user