新增通用聊天图片预览组件

- ImagePreview / ChatImage:全屏预览、ESC 关闭、下载
- 接入工作台、访客 Widget、对话记录
This commit is contained in:
yml2213
2026-07-15 12:44:37 +08:00
parent 32d88f42e7
commit cd28796440
4 changed files with 128 additions and 4 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import {
ExportOutlined, BookOutlined, PictureOutlined,
} from '@ant-design/icons'
import EmojiPicker, { insertAtCursor } from '@/components/common/EmojiPicker'
import { ChatImage } from '@/components/common/ImagePreview'
import { useAuth } from '@/stores/auth'
import {
addSessionNote, claimSession, endSession, getAvailableAgents, getCustomers, getKnowledgeEntries,
@@ -725,7 +726,7 @@ const Dashboard = () => {
}`}
>
{message.type === 'image' ? (
<img src={message.content} alt="聊天图片" className="max-w-64 max-h-64 rounded-lg" />
<ChatImage src={message.content} alt="聊天图片" className="max-w-64 max-h-64" />
) : (
<p className="text-sm leading-normal whitespace-pre-wrap break-words m-0">{message.content}</p>
)}