1.0.2 • Published 3 years ago

@a417420427/use-drag-file v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

监听拖拽上传的文件内容

使用

import {useDragFile} from '@a417420427/use-drag-file'

// const {dropFiles} = useDragFile()
// or
const onDragover = () => {}
const onDrop =() => {}
const onDragenter = () => {}
// dropFiles 文件和当前文件路径信息
const {dropFiles} = useDragFile({
  onDragover,
  onDrop,
  onDragenter
})

demo

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago