From 96b5e4a5824634cb2b02e8eb881fca2839a1e166 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 8 Jul 2026 14:53:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=BB=E4=B8=AD=E7=94=BB=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=B7=BB=E5=8A=A0=E7=89=87=E6=AE=B5=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E5=A4=8D=20+=20=E6=B8=85=E7=90=86?= =?UTF-8?q?=20AssetLibrary=20=E6=9C=AA=E4=BD=BF=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TimelinePanel: handleTogglePicker 打开时根据 currentMode 重置 addType 默认值 - pip 模式默认 pip,voice_over 模式默认 voice - 修复画中画模式下添加片段显示'口播 1'而非'画中画 1'的问题 - AssetLibrary: 删除未使用的 directUploadMutation(遗留代码,上传已由 handleUpload 直接处理) - 修复 TS6133 (unused) + TS2304 (activeLibrary 未定义) 两个编译错误 P0-2 验收发现并修复 --- apps/web/src/pages/assets/AssetLibrary.tsx | 2 ++ .../src/pages/editing-planner/components/TimelinePanel.tsx | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/apps/web/src/pages/assets/AssetLibrary.tsx b/apps/web/src/pages/assets/AssetLibrary.tsx index 0958fcf1d..84b681aef 100644 --- a/apps/web/src/pages/assets/AssetLibrary.tsx +++ b/apps/web/src/pages/assets/AssetLibrary.tsx @@ -375,6 +375,8 @@ const AssetLibrary: React.FC = () => { /* 状态 */ const [selectedIds, setSelectedIds] = useState>(new Set()); + // 大文件直传由 handleUpload 直接调用 uploadAssetDirect 处理 + /* 筛选 */ const [searchText, setSearchText] = useState(""); const [filterType, setFilterType] = useState("all"); diff --git a/apps/web/src/pages/editing-planner/components/TimelinePanel.tsx b/apps/web/src/pages/editing-planner/components/TimelinePanel.tsx index 95d4213c6..cd2493d58 100755 --- a/apps/web/src/pages/editing-planner/components/TimelinePanel.tsx +++ b/apps/web/src/pages/editing-planner/components/TimelinePanel.tsx @@ -102,6 +102,10 @@ const TimelinePanel: React.FC = ({ const handleTogglePicker = () => { if (!showAddPicker) { + // 打开面板时,默认选中当前模式下的第一个可用类型 + const defaultType = + currentMode === "pip" ? "pip" : currentMode === "voice_over" ? "voice" : "voice"; + setAddType(defaultType); updatePickerPosition(); } setShowAddPicker((v) => !v);