fix(frontend): #1913 智能剪辑无模板时后端自动兜底,移除空template硬拦截

This commit is contained in:
2026-09-15 00:47:55 +08:00
parent c1ad41c9f0
commit 3a2ab72eaa
@@ -1,5 +1,5 @@
/**
* Step 1 素材选择组件(#1899 原 Step2 前移)
* Step 1 素材选择组件(#1899 原 Step2 前移,#1913 传递 selectedTemplate)
* 新增片段数量输入,系统按片段数智能匹配素材
*/
import React from "react"
@@ -20,12 +20,24 @@ interface Step2MaterialSelectProps {
/** 片段数量(#1899) */
clipCount: number
onClipCountChange: (n: number) => void
/** 当前选中的模板/草稿 ID;空字符串时由后端自动兜底(#1913) */
selectedTemplate?: string
/** 服务端 clips 创建成功后的回调 */
onServerClipsChange?: (clips: EditPlanClip[]) => void
}
const Step2MaterialSelect: React.FC<Step2MaterialSelectProps> = (props) => {
const m = useStep2Materials(props)
const m = useStep2Materials({
materialMode: props.materialMode,
onMaterialModeChange: props.onMaterialModeChange,
selectedMaterials: props.selectedMaterials,
onSelectedMaterialsChange: props.onSelectedMaterialsChange,
smartSelectedIds: props.smartSelectedIds,
onSmartSelectedIdsChange: props.onSmartSelectedIdsChange,
clipCount: props.clipCount,
selectedTemplate: props.selectedTemplate,
onServerClipsChange: props.onServerClipsChange,
})
return (
<div className="xx-form-section">