diff --git a/Cunkebao/dist/.vite/manifest.json b/Cunkebao/dist/.vite/manifest.json index efc8b536..e78197a2 100644 --- a/Cunkebao/dist/.vite/manifest.json +++ b/Cunkebao/dist/.vite/manifest.json @@ -1,18 +1,14 @@ { - "_charts-DmoeDXY2.js": { - "file": "assets/charts-DmoeDXY2.js", + "_charts-B9_ggjgM.js": { + "file": "assets/charts-B9_ggjgM.js", "name": "charts", "imports": [ - "_ui-D66ihimQ.js", + "_ui-CdpU1706.js", "_vendor-2vc8h_ct.js" ] }, - "_ui-D0C0OGrH.css": { - "file": "assets/ui-D0C0OGrH.css", - "src": "_ui-D0C0OGrH.css" - }, - "_ui-D66ihimQ.js": { - "file": "assets/ui-D66ihimQ.js", + "_ui-CdpU1706.js": { + "file": "assets/ui-CdpU1706.js", "name": "ui", "imports": [ "_vendor-2vc8h_ct.js" @@ -21,6 +17,10 @@ "assets/ui-D0C0OGrH.css" ] }, + "_ui-D0C0OGrH.css": { + "file": "assets/ui-D0C0OGrH.css", + "src": "_ui-D0C0OGrH.css" + }, "_utils-6WF66_dS.js": { "file": "assets/utils-6WF66_dS.js", "name": "utils", @@ -33,18 +33,18 @@ "name": "vendor" }, "index.html": { - "file": "assets/index-bW2KwNBi.js", + "file": "assets/index-BZQSHOtN.js", "name": "index", "src": "index.html", "isEntry": true, "imports": [ "_vendor-2vc8h_ct.js", "_utils-6WF66_dS.js", - "_ui-D66ihimQ.js", - "_charts-DmoeDXY2.js" + "_ui-CdpU1706.js", + "_charts-B9_ggjgM.js" ], "css": [ - "assets/index-BeKt58rz.css" + "assets/index-CciB7EKw.css" ] } } \ No newline at end of file diff --git a/Cunkebao/dist/index.html b/Cunkebao/dist/index.html index 168b3e09..6f790150 100644 --- a/Cunkebao/dist/index.html +++ b/Cunkebao/dist/index.html @@ -11,13 +11,13 @@ - + - - + + - +
diff --git a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageRecord/index.tsx b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageRecord/index.tsx index 426a5023..20c1f580 100644 --- a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageRecord/index.tsx +++ b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageRecord/index.tsx @@ -13,13 +13,18 @@ interface MessageRecordProps { const MessageRecord: React.FC = ({ contract }) => { const messagesEndRef = useRef(null); const currentMessages = useWeChatStore(state => state.currentMessages); + const loadChatMessages = useWeChatStore(state => state.loadChatMessages); + const messagesLoading = useWeChatStore(state => state.messagesLoading); + const isLoadingData = useWeChatStore(state => state.isLoadingData); const currentGroupMembers = useWeChatStore( state => state.currentGroupMembers, ); useEffect(() => { - scrollToBottom(); - }, [currentMessages]); + if (isLoadingData) { + scrollToBottom(); + } + }, [currentMessages, isLoadingData]); const scrollToBottom = () => { messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }); @@ -192,7 +197,9 @@ const MessageRecord: React.FC = ({ contract }) => { return (
-
点击加载更早的信息
+
loadChatMessages(false)}> + 点击加载更早的信息{messagesLoading ? "中" : "1"} +
{groupMessagesByTime(currentMessages).map((group, groupIndex) => ( diff --git a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx index 9019a963..143198f6 100644 --- a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx +++ b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx @@ -68,21 +68,6 @@ const ChatWindow: React.FC = ({ contract }) => {
- -