diff --git a/apps/web/src/pages/editing-planner/components/StickerPanel/components/StickerPropsEditor.tsx b/apps/web/src/pages/editing-planner/components/StickerPanel/components/StickerPropsEditor.tsx index 247745cdf..5632cbd88 100644 --- a/apps/web/src/pages/editing-planner/components/StickerPanel/components/StickerPropsEditor.tsx +++ b/apps/web/src/pages/editing-planner/components/StickerPanel/components/StickerPropsEditor.tsx @@ -107,7 +107,10 @@ export const StickerPropsEditor: React.FC = ({ max={totalDuration} step={0.1} value={sticker.start_time} - onChange={(e) => update({ start_time: Number(e.target.value) })} + onChange={(e) => { + const val = Number(e.target.value) + if (!isNaN(val) && val >= 0 && val <= totalDuration) update({ start_time: val }) + }} /> 时长 = ({ max={totalDuration} step={0.1} value={sticker.duration} - onChange={(e) => update({ duration: Number(e.target.value) })} + onChange={(e) => { + const val = Number(e.target.value) + if (!isNaN(val) && val > 0 && val <= totalDuration) update({ duration: val }) + }} />