From ac37433f5c280b99d525ea1a3755c21ee4226beb Mon Sep 17 00:00:00 2001 From: wb-lh513319 Date: Tue, 13 Aug 2024 18:26:30 +0800 Subject: [PATCH] feat: The dialog list shows logical changes --- .../ant-components/chat/sider/ChatSider.tsx | 3 ++- web_new/pages/chat/index.tsx | 22 ++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/web_new/ant-components/chat/sider/ChatSider.tsx b/web_new/ant-components/chat/sider/ChatSider.tsx index 0db305a9c..54d4d84a9 100644 --- a/web_new/ant-components/chat/sider/ChatSider.tsx +++ b/web_new/ant-components/chat/sider/ChatSider.tsx @@ -155,7 +155,7 @@ const ChatSider: React.FC<{ }> = ({ dialogueList = [], refresh, historyLoading, listLoading, order }) => { const { t } = useTranslation(); const { mode } = useContext(ChatContext); - const [collapsed, setCollapsed] = useState(false); + const [collapsed, setCollapsed] = useState(true); // 展开或收起列表按钮样式 const triggerStyle: React.CSSProperties = useMemo(() => { @@ -194,6 +194,7 @@ const ChatSider: React.FC<{ theme={mode} width={280} collapsible={true} + collapsed={collapsed} collapsedWidth={0} trigger={collapsed ? : } zeroWidthTriggerStyle={triggerStyle} diff --git a/web_new/pages/chat/index.tsx b/web_new/pages/chat/index.tsx index 8ea6e0c77..60e589230 100644 --- a/web_new/pages/chat/index.tsx +++ b/web_new/pages/chat/index.tsx @@ -251,9 +251,20 @@ const Chat: React.FC = () => { } }, [isChatDefault]); - if (scene === 'chat_dashboard') { - return <>{isContract ? : }; - } + // if (scene === 'chat_dashboard') { + // return ( + //
+ // + // {isContract ? : } + //
+ // ); + // } return ( { order={order} /> - {isChatDefault ? ( + {scene === 'chat_dashboard' ? (isContract ? : ) : null} + {scene !== 'chat_dashboard' ? (isChatDefault ? ( @@ -304,7 +316,7 @@ const Chat: React.FC = () => { - )} + )) : null}