@a417420427/use-drag-file
v1.0.2
Published
an react hook of drag file
Downloads
9
Readme
监听拖拽上传的文件内容
使用
import {useDragFile} from '@a417420427/use-drag-file'
// const {dropFiles} = useDragFile()
// or
const onDragover = () => {}
const onDrop =() => {}
const onDragenter = () => {}
// dropFiles 文件和当前文件路径信息
const {dropFiles} = useDragFile({
onDragover,
onDrop,
onDragenter
})