|
@@ -21,9 +21,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="ml-10px w-100%">
|
|
<div class="ml-10px w-100%">
|
|
<div class="flex justify-between items-center w-100%">
|
|
<div class="flex justify-between items-center w-100%">
|
|
- <span>{{ item.userNickname }}</span>
|
|
|
|
|
|
+ <span class="username">{{ item.userNickname }}</span>
|
|
<span class="color-[#989EA6]">
|
|
<span class="color-[#989EA6]">
|
|
- {{ formatDate(item.lastMessageTime) }}
|
|
|
|
|
|
+ {{ formatPast(item.lastMessageTime, 'YYYY-mm-dd') }}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- 最后聊天内容 -->
|
|
<!-- 最后聊天内容 -->
|
|
@@ -70,7 +70,7 @@
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
import { KeFuConversationApi, KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
|
|
import { KeFuConversationApi, KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
|
|
import { useEmoji } from './tools/emoji'
|
|
import { useEmoji } from './tools/emoji'
|
|
-import { formatDate } from '@/utils/formatTime'
|
|
|
|
|
|
+import { formatPast } from '@/utils/formatTime'
|
|
import { KeFuMessageContentTypeEnum } from './tools/constants'
|
|
import { KeFuMessageContentTypeEnum } from './tools/constants'
|
|
import { useAppStore } from '@/store/modules/app'
|
|
import { useAppStore } from '@/store/modules/app'
|
|
|
|
|
|
@@ -185,6 +185,16 @@ watch(showRightMenu, (val) => {
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
transition: border-left 0.05s ease-in-out; /* 设置过渡效果 */
|
|
transition: border-left 0.05s ease-in-out; /* 设置过渡效果 */
|
|
|
|
|
|
|
|
+ .username {
|
|
|
|
+ min-width: 0;
|
|
|
|
+ max-width: 60%;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
.last-message {
|
|
.last-message {
|
|
width: 200px;
|
|
width: 200px;
|
|
overflow: hidden; // 隐藏超出的文本
|
|
overflow: hidden; // 隐藏超出的文本
|