Upload.Dragger 和 react-dnd-html5-backend 共用时,拖动文件上传失效
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从 src/AjaxUploader.jsx 的第 64-68 行开始,尤其关注 onFileDrop 入口点,并复现 Upload.Dragger 与 react-dnd-html5-backend 一起使用时的故障。比较报告中的 stopPropagation workaround 与 wrapper workaround,然后验证同时使用这两个组件时,拖动文件仍能正确上传。
由索引模型根据 Issue 内容生成。
描述
my solution:
https://github.com/react-component/upload/blob/e0c50a096054fafd24c3c14b250576f25e968c88/src/AjaxUploader.jsx#L64-L68
add: e.stopPropagation()
onFileDrop = e => {
e.stopPropagation();
e.preventDefault();
or add a wrapper:
<div onDrop={e => e.stopPropagation()}>
<Upload.Dragger {...props}>...</Upload.Dragger>
</div>
- 主要语言
- TypeScript
- 星标
- 804
- 派生
- 323
- 平均合并
- 12 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react-component/upload 的其他 Issue
-
HVAC website未关闭
难度 5/5 一周以上 新手友好度 10/100
react-component/upload#697 ·
-
难度 2/5 1-3 小时 新手友好度 15/100
react-component/upload#615 ·
-
难度 4/5 3-5 天 新手友好度 35/100
react-component/upload#522 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
react-component/upload#515 ·
-
Clock pyrhon未关闭
难度 5/5 一周以上 新手友好度 10/100
react-component/upload#512 ·
查看 react-component/upload 的全部 Issue
相似的 Issue
-
bot:ai-assisted status:untriaged
难度 2/5 1-3 小时 新手友好度 85/100
midnightntwrk/midnight-js#1424 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
mksglu/context-mode#1268 ·
维护者通常 5 天内回复
-
Edit:未关闭check:failed streams:edit
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
[Table] reserveSelectedRowOnPaginate=false 时表头全选包含其他页数据可能已有人在做 @dvd233 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
Tencent/tdesign-react#4416 · 2 条评论 ·
维护者通常 1 天内回复
-
area:widget bug
难度 2/5 1-3 小时 新手友好度 66/100
interledger/publisher-tools#894 ·
维护者通常 1 天内回复