From 40d4a6384bad28e330fd5b3ba2c80bd89cfb3f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A6=82=E5=A8=81?= Date: Mon, 5 Jan 2026 16:36:57 +0800 Subject: [PATCH] feat: userChat --- src/app.tsx | 9 +- src/components/Custom/ChatList/ChatItem.tsx | 19 ++ .../Custom/ChatList/hooks/useChat.ts | 166 ++++++++++++++++++ src/components/Custom/ChatList/index.less | 46 +++++ src/components/Custom/ChatList/index.tsx | 30 ++++ src/components/Custom/ChatList/types.ts | 9 + src/components/Custom/InputBar/index.less | 2 +- src/components/Custom/InputBar/index.tsx | 18 +- src/pages/Welcome.tsx | 4 +- src/pages/chat/index.less | 26 +-- src/pages/chat/index.tsx | 42 ++++- src/services/ant-design-pro/api.ts | 60 ++++++- 12 files changed, 393 insertions(+), 38 deletions(-) create mode 100644 src/components/Custom/ChatList/ChatItem.tsx create mode 100644 src/components/Custom/ChatList/hooks/useChat.ts create mode 100644 src/components/Custom/ChatList/index.less create mode 100644 src/components/Custom/ChatList/index.tsx create mode 100644 src/components/Custom/ChatList/types.ts diff --git a/src/app.tsx b/src/app.tsx index a7ae802..58edbbb 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -18,6 +18,7 @@ import '@ant-design/v5-patch-for-react-19'; const isDev = process.env.NODE_ENV === 'development'; const loginPath = '/user/login'; +const chatPath = '/chat'; /** * @see https://umijs.org/docs/api/runtime-config#getinitialstate @@ -79,7 +80,13 @@ export const layout: RunTimeLayoutConfig = ({ waterMarkProps: { content: initialState?.currentUser?.name, }, - footerRender: () =>