This commit is contained in:
sjy
2026-07-07 14:28:37 +08:00
parent a0086a15c7
commit 6026ec8670
4 changed files with 263 additions and 221 deletions
+8 -34
View File
@@ -2520,21 +2520,8 @@ const AIChatPage: React.FC = () => {
setCurrentMedia([...currentMedia, ...newMedia]);
message.success(`成功添加${items.length}个历史记录`);
}}
onPortraitSelect={async (items) => {
const files: File[] = [];
for (const item of items) {
try {
const response = await fetch(item.avatar);
const blob = await response.blob();
const file = new File([blob], item.name, { type: blob.type });
files.push(file);
} catch {
message.error(`图片${item.name}下载失败`);
}
}
if (files.length > 0) {
await handleBatchUpload(files);
}
onPortraitSelect={(items) => {
handlePrivatePortraitAssetsSelected(items as any);
}}
uploading={uploading}
tooltipTitle={mediaType === 'image'
@@ -2588,7 +2575,7 @@ const AIChatPage: React.FC = () => {
</div>
</UploadSelector>
)}
{mediaType === 'video' && currentMedia.length === 0 && (
{/* {mediaType === 'video' && currentMedia.length === 0 && (
<Button
size="small"
onClick={() => setPrivateAssetPickerOpen(true)}
@@ -2596,7 +2583,7 @@ const AIChatPage: React.FC = () => {
>
真人素材库
</Button>
)}
)} */}
{/* 层叠附件展示 - 鼠标移入向右排列展开 */}
{currentMedia.length > 0 && (
@@ -2713,21 +2700,8 @@ const AIChatPage: React.FC = () => {
setCurrentMedia([...currentMedia, ...newMedia]);
message.success(`成功添加${items.length}个历史记录`);
}}
onPortraitSelect={async (items) => {
const files: File[] = [];
for (const item of items) {
try {
const response = await fetch(item.avatar);
const blob = await response.blob();
const file = new File([blob], item.name, { type: blob.type });
files.push(file);
} catch {
message.error(`图片${item.name}下载失败`);
}
}
if (files.length > 0) {
await handleBatchUpload(files);
}
onPortraitSelect={(items) => {
handlePrivatePortraitAssetsSelected(items as any);
}}
uploading={uploading}
tooltipTitle={mediaType === 'image'
@@ -2768,7 +2742,7 @@ const AIChatPage: React.FC = () => {
</div>
</UploadSelector>
)}
{mediaType === 'video' && currentMedia.length > 0 && (
{/* {mediaType === 'video' && currentMedia.length > 0 && (
<Tooltip title="选择真人素材库">
<div
onClick={(e) => { e.stopPropagation(); setPrivateAssetPickerOpen(true); }}
@@ -2795,7 +2769,7 @@ const AIChatPage: React.FC = () => {
</div>
</Tooltip>
)}
)} */}
</div>
)}
</>