fix: 预览卡片比例动态适配 videoRatio,修复16:9视频右侧白框 #1302
@@ -42,7 +42,7 @@ const PREVIEW_COUNT_OPTIONS = [
|
||||
const Step4GeneratePreview: React.FC<Step4GeneratePreviewProps> = ({
|
||||
templateName: _templateName,
|
||||
materialCount: _materialCount,
|
||||
videoRatio: _videoRatio,
|
||||
videoRatio,
|
||||
previewCount,
|
||||
onPreviewCountChange,
|
||||
items,
|
||||
@@ -55,6 +55,7 @@ const Step4GeneratePreview: React.FC<Step4GeneratePreviewProps> = ({
|
||||
onGeneratePreview,
|
||||
onRegeneratePreview,
|
||||
}) => {
|
||||
const aspectRatio = (videoRatio || "16:9").replace(":", "/") // "9:16" → "9/16", "16:9" → "16/9"
|
||||
const isIdle = overallStatus === "idle"
|
||||
const isError = overallStatus === "error" && !items.some((it) => it.status === "ready")
|
||||
|
||||
@@ -161,8 +162,7 @@ const Step4GeneratePreview: React.FC<Step4GeneratePreviewProps> = ({
|
||||
{/* 缩略图/状态区域 */}
|
||||
<div
|
||||
style={{
|
||||
aspectRatio: "9/16",
|
||||
maxHeight: 180,
|
||||
aspectRatio,
|
||||
background: "#000",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
|
||||
Reference in New Issue
Block a user