From 5de2d9f604b307a70b4a6c42ea1fdfaa3e623d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=87=E7=AC=A6?= Date: Fri, 27 Mar 2026 10:14:35 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(chat):=20=E6=B7=BB=E5=8A=A0=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E5=8C=BA=E5=9F=9F=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加了文本的国家化支持 - 删除了冗余的文本注释 - 修改拖拽遮罩的父元素显示方式 从 v-if 改为 v-show,确保过度动画生效 --- vue3/src/config/i18n/messages/chat.ts | 24 +++++++++++ .../chat-home/components/ChatHomeChatCol.vue | 41 ++++--------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/vue3/src/config/i18n/messages/chat.ts b/vue3/src/config/i18n/messages/chat.ts index 68105c07..da814583 100644 --- a/vue3/src/config/i18n/messages/chat.ts +++ b/vue3/src/config/i18n/messages/chat.ts @@ -184,4 +184,28 @@ export const i18nMessagesChatPart = { 'ko-KR': () => '[파일]' as const, 'ru-RU': () => '[Файл]' as const, }, + chatDragZoneReleaseText: { + 'en-US': () => 'You can release now' as const, + 'zh-CN': () => '现在可以松手了哦' as const, + 'zh-TW': () => '現在可以放手了哦' as const, + 'ja-JP': () => '今すぐリリースできます' as const, + 'ko-KR': () => '이제 놓을 수 있습니다' as const, + 'ru-RU': () => 'Теперь можно отпустить' as const, + }, + chatDragZoneFilePlaceholderText: { + 'en-US': () => 'Drag files here' as const, + 'zh-CN': () => '你好 往这里拖文件喵' as const, + 'zh-TW': () => '你好 往這裡拖檔案喵' as const, + 'ja-JP': () => 'ここにファイルをドラッグしてください' as const, + 'ko-KR': () => '여기에 파일을 드래그하세요' as const, + 'ru-RU': () => 'Перетащите файлы сюда' as const, + }, + chatDragZoneImagePlaceholderText: { + 'en-US': () => 'Drag images here' as const, + 'zh-CN': () => '你好 往这里拖图片喵' as const, + 'zh-TW': () => '你好 往這裡拖圖片喵' as const, + 'ja-JP': () => 'ここに画像をドラッグしてください' as const, + 'ko-KR': () => '여기에 이미지를 드래그하세요' as const, + 'ru-RU': () => 'Перетащите изображения сюда' as const, + }, } as const satisfies I18nMessagesSatisfiesType diff --git a/vue3/src/views/chat-home/components/ChatHomeChatCol.vue b/vue3/src/views/chat-home/components/ChatHomeChatCol.vue index 22f5c097..7af29995 100644 --- a/vue3/src/views/chat-home/components/ChatHomeChatCol.vue +++ b/vue3/src/views/chat-home/components/ChatHomeChatCol.vue @@ -108,14 +108,6 @@ const handleDragLeave = (e: DragEvent) => { } } } -// const handleDragOver = (e: DragEvent) => { -// e.preventDefault() -// if (e.dataTransfer && e.dataTransfer.types.includes('Files')) { -// e.dataTransfer.dropEffect = 'copy' -// } else { -// e.dataTransfer.dropEffect = 'none' -// } -// } const handleDragOver = (e: DragEvent) => { e.preventDefault() @@ -255,7 +247,7 @@ onUnmounted(() => {