fix: file selector

This commit is contained in:
archer
2023-08-14 10:15:57 +08:00
parent 36bd25822d
commit 0d7022026b
3 changed files with 31 additions and 10 deletions

View File

@@ -193,7 +193,14 @@ const QAImport = ({ kbId }: { kbId: string }) => {
return (
<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
fileExtension={fileExtension}
onSelectFile={onSelectFile}
@@ -203,7 +210,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
{!emptyFiles && (
<>
<Box py={4} maxH={'400px'}>
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
{files.map((item) => (
<Flex
key={item.id}
@@ -295,7 +302,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
</Flex>
</>
)}
</Box>
</Flex>
{!emptyFiles && (
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
{previewFile ? (