From 557234841de9cccc24ae4facd4938412a6032c81 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 14 Sep 2025 00:18:56 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20ChatFragment=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=88=86=E9=9D=A2=E6=9D=BF=E7=9A=84=E6=A8=A3=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/chat/ChatFragment.tsx | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 client/ui/chat/ChatFragment.tsx diff --git a/client/ui/chat/ChatFragment.tsx b/client/ui/chat/ChatFragment.tsx new file mode 100644 index 0000000..aff38fb --- /dev/null +++ b/client/ui/chat/ChatFragment.tsx @@ -0,0 +1,84 @@ +import { Tab } from "mdui" +import useEventListener from "../useEventListener.ts" +import Message from "./Message.jsx" +import MessageContainer from "./MessageContainer.jsx" + +import * as React from 'react' + +export default function ChatFragment({ ...props } = {}) { + const messageList = React.useState([]) + + const [tabItemSelected, setTabItemSelected] = React.useState('Chat') + const tabRef: React.MutableRefObject = React.useRef(null) + useEventListener(tabRef, 'change', (event) => { + setTabItemSelected((event.target as HTMLElement as Tab).value as string) + }) + + return ( +
+ + Title + 設定 + + +
+ 加載更多 +
+ + + { + // 输入框 + } +
+ + + +
+
+ + Work in progress... + +
+
+ ) +}