Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
0d702202
authored
Aug 14, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: file selector
parent
36bd2582
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
client/src/pages/kb/detail/components/Import/Chunk.tsx
+11
-4
client/src/pages/kb/detail/components/Import/Csv.tsx
+10
-3
client/src/pages/kb/detail/components/Import/QA.tsx
+10
-3
No files found.
client/src/pages/kb/detail/components/Import/Chunk.tsx
View file @
0d702202
...
@@ -202,7 +202,14 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
...
@@ -202,7 +202,14 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
return
(
return
(
<
Box
display=
{
[
'block'
,
'flex'
]
}
h=
{
[
'auto'
,
'100%'
]
}
>
<
Box
display=
{
[
'block'
,
'flex'
]
}
h=
{
[
'auto'
,
'100%'
]
}
>
<
Box
flex=
{
1
}
minW=
{
[
'auto'
,
'400px'
]
}
w=
{
[
'100%'
,
0
]
}
p=
{
[
4
,
8
]
}
>
<
Flex
flexDirection=
{
'column'
}
flex=
{
'1 0 0'
}
h=
{
'100%'
}
minW=
{
[
'auto'
,
'400px'
]
}
w=
{
[
'100%'
,
0
]
}
p=
{
[
4
,
8
]
}
>
<
FileSelect
<
FileSelect
fileExtension=
{
fileExtension
}
fileExtension=
{
fileExtension
}
onSelectFile=
{
onSelectFile
}
onSelectFile=
{
onSelectFile
}
...
@@ -212,7 +219,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
...
@@ -212,7 +219,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
{
!
emptyFiles
&&
(
{
!
emptyFiles
&&
(
<>
<>
<
Box
py=
{
4
}
maxH=
{
'400px
'
}
>
<
Box
py=
{
4
}
px=
{
2
}
maxH=
{
'400px'
}
overflow=
{
'auto
'
}
>
{
files
.
map
((
item
)
=>
(
{
files
.
map
((
item
)
=>
(
<
Flex
<
Flex
key=
{
item
.
id
}
key=
{
item
.
id
}
...
@@ -314,7 +321,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
...
@@ -314,7 +321,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
</
Flex
>
</
Flex
>
</>
</>
)
}
)
}
</
Bo
x
>
</
Fle
x
>
{
!
emptyFiles
&&
(
{
!
emptyFiles
&&
(
<
Box
flex=
{
'2 0 0'
}
w=
{
[
'100%'
,
0
]
}
h=
{
'100%'
}
>
<
Box
flex=
{
'2 0 0'
}
w=
{
[
'100%'
,
0
]
}
h=
{
'100%'
}
>
{
previewFile
?
(
{
previewFile
?
(
...
@@ -373,7 +380,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
...
@@ -373,7 +380,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
{
files
.
map
((
file
)
=>
{
files
.
map
((
file
)
=>
file
.
chunks
.
map
((
item
,
i
)
=>
(
file
.
chunks
.
map
((
item
,
i
)
=>
(
<
Box
<
Box
key=
{
i
tem
}
key=
{
i
}
py=
{
4
}
py=
{
4
}
bg=
{
'myWhite.500'
}
bg=
{
'myWhite.500'
}
my=
{
2
}
my=
{
2
}
...
...
client/src/pages/kb/detail/components/Import/Csv.tsx
View file @
0d702202
...
@@ -133,7 +133,14 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
...
@@ -133,7 +133,14 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
return
(
return
(
<
Box
display=
{
[
'block'
,
'flex'
]
}
h=
{
[
'auto'
,
'100%'
]
}
>
<
Box
display=
{
[
'block'
,
'flex'
]
}
h=
{
[
'auto'
,
'100%'
]
}
>
<
Box
flex=
{
1
}
minW=
{
[
'auto'
,
'400px'
]
}
w=
{
[
'100%'
,
0
]
}
p=
{
[
4
,
8
]
}
>
<
Flex
flexDirection=
{
'column'
}
flex=
{
'1 0 0'
}
h=
{
'100%'
}
minW=
{
[
'auto'
,
'400px'
]
}
w=
{
[
'100%'
,
0
]
}
p=
{
[
4
,
8
]
}
>
<
FileSelect
<
FileSelect
fileExtension=
{
fileExtension
}
fileExtension=
{
fileExtension
}
onSelectFile=
{
onSelectFile
}
onSelectFile=
{
onSelectFile
}
...
@@ -147,7 +154,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
...
@@ -147,7 +154,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
{
!
emptyFiles
&&
(
{
!
emptyFiles
&&
(
<>
<>
<
Box
py=
{
4
}
maxH=
{
'400px
'
}
>
<
Box
py=
{
4
}
px=
{
2
}
maxH=
{
'400px'
}
overflow=
{
'auto
'
}
>
{
files
.
map
((
item
)
=>
(
{
files
.
map
((
item
)
=>
(
<
Flex
<
Flex
key=
{
item
.
id
}
key=
{
item
.
id
}
...
@@ -193,7 +200,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
...
@@ -193,7 +200,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
</
Flex
>
</
Flex
>
</>
</>
)
}
)
}
</
Bo
x
>
</
Fle
x
>
{
!
emptyFiles
&&
(
{
!
emptyFiles
&&
(
<
Box
flex=
{
'2 0 0'
}
w=
{
[
'100%'
,
0
]
}
h=
{
'100%'
}
pt=
{
[
4
,
8
]
}
overflow=
{
'overlay'
}
>
<
Box
flex=
{
'2 0 0'
}
w=
{
[
'100%'
,
0
]
}
h=
{
'100%'
}
pt=
{
[
4
,
8
]
}
overflow=
{
'overlay'
}
>
<
Box
px=
{
[
4
,
8
]
}
fontSize=
{
[
'lg'
,
'xl'
]
}
fontWeight=
{
'bold'
}
>
<
Box
px=
{
[
4
,
8
]
}
fontSize=
{
[
'lg'
,
'xl'
]
}
fontWeight=
{
'bold'
}
>
...
...
client/src/pages/kb/detail/components/Import/QA.tsx
View file @
0d702202
...
@@ -193,7 +193,14 @@ const QAImport = ({ kbId }: { kbId: string }) => {
...
@@ -193,7 +193,14 @@ const QAImport = ({ kbId }: { kbId: string }) => {
return
(
return
(
<
Box
display=
{
[
'block'
,
'flex'
]
}
h=
{
[
'auto'
,
'100%'
]
}
>
<
Box
display=
{
[
'block'
,
'flex'
]
}
h=
{
[
'auto'
,
'100%'
]
}
>
<
Box
flex=
{
1
}
minW=
{
[
'auto'
,
'400px'
]
}
w=
{
[
'100%'
,
0
]
}
p=
{
[
4
,
8
]
}
>
<
Flex
flexDirection=
{
'column'
}
flex=
{
'1 0 0'
}
h=
{
'100%'
}
minW=
{
[
'auto'
,
'400px'
]
}
w=
{
[
'100%'
,
0
]
}
p=
{
[
4
,
8
]
}
>
<
FileSelect
<
FileSelect
fileExtension=
{
fileExtension
}
fileExtension=
{
fileExtension
}
onSelectFile=
{
onSelectFile
}
onSelectFile=
{
onSelectFile
}
...
@@ -203,7 +210,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
...
@@ -203,7 +210,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
{
!
emptyFiles
&&
(
{
!
emptyFiles
&&
(
<>
<>
<
Box
py=
{
4
}
maxH=
{
'400px
'
}
>
<
Box
py=
{
4
}
px=
{
2
}
maxH=
{
'400px'
}
overflow=
{
'auto
'
}
>
{
files
.
map
((
item
)
=>
(
{
files
.
map
((
item
)
=>
(
<
Flex
<
Flex
key=
{
item
.
id
}
key=
{
item
.
id
}
...
@@ -295,7 +302,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
...
@@ -295,7 +302,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
</
Flex
>
</
Flex
>
</>
</>
)
}
)
}
</
Bo
x
>
</
Fle
x
>
{
!
emptyFiles
&&
(
{
!
emptyFiles
&&
(
<
Box
flex=
{
'2 0 0'
}
w=
{
[
'100%'
,
0
]
}
h=
{
'100%'
}
>
<
Box
flex=
{
'2 0 0'
}
w=
{
[
'100%'
,
0
]
}
h=
{
'100%'
}
>
{
previewFile
?
(
{
previewFile
?
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment