8s时长不走剧本拓展

This commit is contained in:
北枳 2025-09-19 20:17:26 +08:00
parent 61a7786b0a
commit 876da82139

View File

@ -162,6 +162,20 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
...prev,
[key]: value,
}));
if (key === 'videoDuration') {
// 当选择 8s 时,强制关闭剧本扩展并禁用开关
if (value === '8s') {
setConfigOptions((prev) => ({
...prev,
expansion_mode: false,
}));
} else {
setConfigOptions((prev) => ({
...prev,
expansion_mode: true,
}));
}
}
};
const handleCreateVideo = async () => {
@ -404,6 +418,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
<Switch
size="small"
checked={configOptions.expansion_mode}
disabled={configOptions.videoDuration === '8s'}
onChange={(checked) => onConfigChange('expansion_mode', checked)}
/>
</div>