新增通用聊天图片预览组件
- ImagePreview / ChatImage:全屏预览、ESC 关闭、下载 - 接入工作台、访客 Widget、对话记录
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user