From 57a54d14c8c8e5b8b27b82f4f9d5cfa51bdac9f7 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 29 May 2025 12:06:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(im=5Fchat=5Finfo):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=B6=88=E6=81=AF=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 AQUplodeImage 组件用于上传图片 - 在聊天界面添加发送图片的功能 - 实现图片消息的展示和预览 -优化聊天界面布局和样式 --- components/AQ/AQUplodeImage.vue | 56 +++++++++ pages/common/im_chat_info.vue | 208 ++++++++++++++++++++++++++------ 2 files changed, 228 insertions(+), 36 deletions(-) create mode 100644 components/AQ/AQUplodeImage.vue diff --git a/components/AQ/AQUplodeImage.vue b/components/AQ/AQUplodeImage.vue new file mode 100644 index 0000000..7d67ef8 --- /dev/null +++ b/components/AQ/AQUplodeImage.vue @@ -0,0 +1,56 @@ + + + diff --git a/pages/common/im_chat_info.vue b/pages/common/im_chat_info.vue index ae88c48..33c8918 100644 --- a/pages/common/im_chat_info.vue +++ b/pages/common/im_chat_info.vue @@ -15,16 +15,25 @@ {{v.created_at}} - - {{v.content}} + + + {{v.content}} + + + + - - {{v.content}} + + {{v.content}} + + + + @@ -36,27 +45,66 @@ - + + + + + + + + + + + + + + + + + + + + + + 相册 + + + + + + + + @@ -369,13 +452,20 @@ export default { word-wrap: break-word; /* 允许长单词或 URL 换行 */ word-break: break-all; /* 强制所有字符换行 */ .text_box{} + .img_box { + .chat_img { + width: 200rpx; + height: 200rpx; + border-radius: 16rpx; + } + } } .left_item{ - background-color: #f4f6f9; + //background-color: #f4f6f9; color: #343434; } .right_item{ - background-color: #1684fc; + //background-color: #1684fc; color: #fff; } } @@ -390,12 +480,12 @@ export default { position: fixed; bottom: 0; - padding: 50rpx 50rpx; + padding: 50rpx 30rpx; display: flex; justify-content:space-between; align-items: center; + gap: 20rpx; .left_box{ - width: 70%; .input{ background-color: #f4f6f9; height: 88rpx; @@ -403,22 +493,28 @@ export default { font-size: 28rpx; border-radius: 32rpx; - width: 532rpx; + width: 480rpx; color: #292929; font-size: 28rpx; } } .right_box{ - border-radius: 50%; - background-color: #a2cefe; - width: 88rpx; - height: 88rpx; + width: 100%; display: flex; - justify-content: center; + justify-content: space-between; align-items: center; - .send_img{ - width: 36rpx; - height: 36rpx; + .img_box{ + width: 88rpx; + height: 88rpx; + border-radius: 50%; + background-color: #a2cefe; + display: flex; + justify-content: center; + align-items: center; + .send_img{ + width: 36rpx; + height: 36rpx; + } } } @@ -428,4 +524,44 @@ export default { color: #999999; padding-left: 30rpx; } + + + /* 更多选项相关 自定义内容区样式需自行控制 */ + .more_section{ + .fui-scroll__wrap { + padding-top: 30rpx; + position: relative; + } + .fui-title { + font-size: 30rpx; + font-weight: bold; + text-align: center; + padding-bottom: 24rpx; + } + .fui-icon__close { + position: absolute; + top: 24rpx; + left: 24rpx; + } + .fui-scroll__view { + width: 100%; + height: 350rpx; + } + + .ul{ + padding: 10rpx 40rpx; + display: flex; + .li{ + display: flex; + flex-direction: column; + align-items: center; + .icon_box{ + } + .title{ + font-size: 28rpx; + text-align: center; + } + } + } + } \ No newline at end of file