From 94ece7cd161f20ed09d2fca509b5945cab0d1a8b Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 30 Jul 2026 12:02:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B4=B4=E7=BA=B8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=A2=9E=E5=8A=A0NaN=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=92=8C=E8=8C=83=E5=9B=B4=E8=BE=B9=E7=95=8C=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=EF=BC=88AI=20Review=E9=98=BB=E5=A1=9E=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StickerPanel/components/StickerPropsEditor.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 }) + }} />