From 6cc14c1e324e10f77f8cf2a586c453b51d27ff0d Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Sat, 3 Jan 2026 19:21:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BE=E7=89=87=E5=B9=BF=E5=9C=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Ai.Vue3/src/api/aiImage/types.ts | 20 +- .../chat/image/components/ImageGenerator.vue | 51 +- .../chat/image/components/ImagePlaza.vue | 525 ++++++++---- .../pages/chat/image/components/MyImages.vue | 764 +++++++++++------- .../pages/chat/image/components/TaskCard.vue | 65 +- 5 files changed, 968 insertions(+), 457 deletions(-) diff --git a/Yi.Ai.Vue3/src/api/aiImage/types.ts b/Yi.Ai.Vue3/src/api/aiImage/types.ts index 0337aff1..0ba3ed0f 100644 --- a/Yi.Ai.Vue3/src/api/aiImage/types.ts +++ b/Yi.Ai.Vue3/src/api/aiImage/types.ts @@ -14,12 +14,23 @@ export interface TaskStatusResponse { publishStatus: string; categories: string[]; creationTime: string; + errorInfo?: string; } export interface TaskListRequest { - PageIndex: number; - PageSize: number; + SkipCount: number; + MaxResultCount: number; TaskStatus?: 'Processing' | 'Success' | 'Fail'; + Prompt?: string; + PublishStatus?: 'Unpublished' | 'Published'; + StartTime?: string; + EndTime?: string; + OrderByColumn?: string; + IsAsc?: string; + IsAscending?: boolean; + Sorting?: string; + Categories?: string; + UserName?: string; } export interface TaskItem { @@ -31,6 +42,10 @@ export interface TaskItem { publishStatus: string; categories: string[]; creationTime: string; + errorInfo?: string; + isAnonymous?: boolean; + userName?: string | null; + userId?: string | null; } export interface TaskListResponse { @@ -41,6 +56,7 @@ export interface TaskListResponse { export interface PublishImageRequest { taskId: string; categories: string[]; + isAnonymous?: boolean; } export interface ImageModel { diff --git a/Yi.Ai.Vue3/src/pages/chat/image/components/ImageGenerator.vue b/Yi.Ai.Vue3/src/pages/chat/image/components/ImageGenerator.vue index 2145c693..067daa8f 100644 --- a/Yi.Ai.Vue3/src/pages/chat/image/components/ImageGenerator.vue +++ b/Yi.Ai.Vue3/src/pages/chat/image/components/ImageGenerator.vue @@ -3,6 +3,7 @@ import type { UploadFile, UploadUserFile } from 'element-plus'; import type { ImageModel, TaskStatusResponse } from '@/api/aiImage/types'; import { CircleCloseFilled, + CopyDocument, Delete, Download, MagicStick, @@ -11,6 +12,7 @@ import { Refresh, ZoomIn, } from '@element-plus/icons-vue'; +import { useClipboard } from '@vueuse/core'; import { ElMessage } from 'element-plus'; import { computed, onMounted, onUnmounted, ref, watch } from 'vue'; import { getSelectableTokenInfo } from '@/api'; @@ -25,6 +27,8 @@ const props = defineProps({ const emit = defineEmits(['task-created']); +const { copy } = useClipboard(); + // State const tokenOptions = ref([]); const selectedTokenId = ref(''); @@ -292,6 +296,11 @@ async function downloadImage() { } } +async function copyError(text: string) { + await copy(text); + ElMessage.success('错误信息已复制'); +} + // Exposed methods for external control function setPrompt(text: string) { prompt.value = text; @@ -351,7 +360,7 @@ onUnmounted(() => { 配置 - + { :label="model.modelName" :value="model.modelId" > -
- {{ model.modelName }} - {{ model.modelDescribe }} +
+ {{ model.modelName }} + {{ model.modelDescribe }}
- +