From 7fae98913908f6fe828f0b52480c1f4efe5a4b86 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 01 十一月 2024 12:30:04 +0800
Subject: [PATCH] 修改页面

---
 src/components/chat/Chat.vue |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue
index f881ca4..5a7e090 100644
--- a/src/components/chat/Chat.vue
+++ b/src/components/chat/Chat.vue
@@ -13,7 +13,7 @@
 						v-for="(item, index) of computedMessageList"
 						:key="`${item.historyId}_${item.role}`"
 					>
-						<div class="absolute top-0 left-[72px] text-[#1c86ff]">{{ item?.createTime?.slice(5, 19) }}</div>
+						<div class="absolute top-0 left-[72px] text-[#8d8e99]">{{ item?.createTime }}</div>
 						<img
 							class="rounded-full size-12 flex-0"
 							:class="{ 'mr-4': item.role === RoleEnum.assistant, 'ml-4': item.role === RoleEnum.user }"
@@ -162,6 +162,7 @@
 
 <script setup lang="ts">
 import _ from 'lodash';
+import moment from 'moment';
 import { v4 as uuidv4 } from 'uuid';
 import { computed, onMounted, ref } from 'vue';
 import FeedbackPanel from './components/FeedbackPanel.vue';
@@ -405,8 +406,10 @@
 	sendChatMessage(messageContent.value, cb);
 };
 const appendLastMessageContent = (content: ChatContent) => {
+	const currentTime = moment().format('MM鏈圖D鏃� HH:mm:ss');
 	if (messageList.value.at(-1)) {
 		messageList.value.at(-1).content = content;
+		messageList.value.at(-1).createTime = currentTime;
 	}
 };
 const { loadRangeData, onChatListScroll, moreIsLoading, nextUserMsgEndIndex } = useScrollLoad({

--
Gitblit v1.9.3