fix(aigc): correct generated media preview handling
update ResultPreview component to use proper image and video result URLs refine isVideo detection logic across detail and shared work pages add pointer-events none to preview elements to avoid blocking user interactions standardize media URL usage between AIGC detail and shared work components
This commit is contained in:
@@ -65,7 +65,7 @@ const result = computed(() => {
|
||||
|
||||
const imageUrl = record.imageResultUrl || "";
|
||||
const videoUrl = record.videoResultUrl || "";
|
||||
const isVideo = Boolean(videoUrl) && (record.generatorType === 1 || !imageUrl);
|
||||
const isVideo = Number(record.generatorType) === 1;
|
||||
const typeText = getMappedText(GENERATOR_TYPE_TEXT, record.generatorType, "类型");
|
||||
const statusText = getMappedText(TASK_STATUS_TEXT, record.taskStatus, "状态");
|
||||
const consumedText =
|
||||
@@ -76,7 +76,9 @@ const result = computed(() => {
|
||||
return {
|
||||
id: record.taskId,
|
||||
title: record.itemTitle || record.taskId || "生成结果",
|
||||
cover: isVideo ? videoUrl : imageUrl || videoUrl,
|
||||
cover: isVideo ? videoUrl : imageUrl,
|
||||
imageResultUrl: imageUrl,
|
||||
videoResultUrl: videoUrl,
|
||||
mediaType: isVideo ? "video" : "image",
|
||||
accent: "#0a4d46",
|
||||
variantLabel: typeText,
|
||||
|
||||
Reference in New Issue
Block a user