元素绑定拖拽事件
selectFrame.ondrop = (e) => {
e.preventDefault() // 阻止拖放后的浏览器默认行为
const data = e.dataTransfer.files[0] // 获取文件对象
}
上传代码示例
uniCloud.uploadFile({
cloudPath:path,
filePath:file,
onUploadProgress: (ev) => {
},
success: (ev) => {
},
fail(err) {
}
})
1 个回复
DCloud_uniCloud_WYQ
https://ask.dcloud.net.cn/question/113478