From fbd990151c31065ef779d438043f91ecf9928f8f Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Thu, 29 Jun 2023 09:53:30 +0800 Subject: [PATCH 1/4] feat: add the text document --- datacenter/app/datastores/documents/page.tsx | 63 +++++++++++++++++++- datacenter/app/datastores/page.tsx | 49 ++++++++++++++- 2 files changed, 110 insertions(+), 2 deletions(-) diff --git a/datacenter/app/datastores/documents/page.tsx b/datacenter/app/datastores/documents/page.tsx index f1612aaa1..9b9393350 100644 --- a/datacenter/app/datastores/documents/page.tsx +++ b/datacenter/app/datastores/documents/page.tsx @@ -10,6 +10,7 @@ import { Box, Stack, Input, + Textarea, Chip, styled } from '@/lib/mui' @@ -61,6 +62,8 @@ const Documents = () => { const [documents, setDocuments] = useState([]) const [webPageUrl, setWebPageUrl] = useState('') const [documentName, setDocumentName] = useState('') + const [textSource, setTextSource] = useState(''); + const [text, setText] = useState(''); const [originFileObj, setOriginFileObj] = useState(null) const props: UploadProps = { name: 'file', @@ -293,7 +296,20 @@ const Documents = () => { ) : ( - <> + <> + Source: + setTextSource(e.target.value)} + sx={{ marginBottom: '20px' }} + /> + Text: +