feat: support batch upload files (#419)
This commit is contained in:
parent
8a4d19d9ba
commit
d637a147ee
10 changed files with 288 additions and 226 deletions
|
|
@ -9,7 +9,6 @@ import { fetchFilePreview } from '@/service/common'
|
|||
|
||||
type IProps = {
|
||||
file?: File
|
||||
notionPage?: any
|
||||
hidePreview: () => void
|
||||
}
|
||||
|
||||
|
|
@ -33,14 +32,15 @@ const FilePreview = ({
|
|||
const getFileName = (currentFile?: File) => {
|
||||
if (!currentFile)
|
||||
return ''
|
||||
|
||||
const arr = currentFile.name.split('.')
|
||||
return arr.slice(0, -1).join()
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (file)
|
||||
if (file) {
|
||||
setLoading(true)
|
||||
getPreviewContent(file.id)
|
||||
}
|
||||
}, [file])
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue