From b844f82c506d77749c0f3857ed3d241ad2692fca Mon Sep 17 00:00:00 2001 From: luJianJun <2587063613@qq.com> Date: Thu, 24 Aug 2023 15:18:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../conversations/ConversationSidebarItem.tsx | 2 +- src/pages/chat/components/dataList.tsx | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/conversations/ConversationSidebarItem.tsx b/src/components/conversations/ConversationSidebarItem.tsx index bfb56c5..97c9b8b 100644 --- a/src/components/conversations/ConversationSidebarItem.tsx +++ b/src/components/conversations/ConversationSidebarItem.tsx @@ -23,7 +23,7 @@ export default ({ instance }: Props) => { let mtBox = document.getElementsByClassName('flex-1 mt-14 flex flex-col overflow-hidden')[0] if (!chatShow.get()) { infoHeader.style.display = "flex"; - infoSend.style.display = "flex"; + infoSend.style.display = "block"; mtBox.style.marginTop = '3.5rem'; } currentConversationId.set(instance.id) diff --git a/src/pages/chat/components/dataList.tsx b/src/pages/chat/components/dataList.tsx index 5c0845c..9479d66 100644 --- a/src/pages/chat/components/dataList.tsx +++ b/src/pages/chat/components/dataList.tsx @@ -155,21 +155,25 @@ export default () => { uniqid.set(id) setDataInfo() } - const unId=useStore(uniqid) + const unId = useStore(uniqid) //设置切换显示内容 - const setDataInfo=()=>{ + const setDataInfo = () => { let infoSend = document.getElementById("infoSend"); let infoHeader = document.getElementById("infoHeader"); let mtBox = document.getElementsByClassName('flex-1 mt-14 flex flex-col overflow-hidden')[0] if (chatShow.get()) { infoSend.style.display = "none"; - infoHeader.style.display = "none"; - mtBox.style.marginTop = 0; + if (!isMobile()) { + infoHeader.style.display = "none"; + mtBox.style.marginTop = 0; + } } else { - infoHeader.style.display = "flex"; infoSend.style.display = "flex"; - mtBox.style.marginTop = '3.5rem'; + if (!isMobile()) { + infoHeader.style.display = "flex"; + mtBox.style.marginTop = '3.5rem'; + } } } @@ -224,9 +228,9 @@ export default () => { {(instance, i) => ( - + )}