Closed thep0y closed 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
upload | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 13, 2024 3:58am |
@MadCcc 看看
Attention: 14 lines
in your changes are missing coverage. Please review.
Comparison is base (
6027d4c
) 87.21% compared to head (050b5fb
) 82.91%.:exclamation: Current head 050b5fb differs from pull request most recent head bae65e1. Consider uploading reports for the commit bae65e1 to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/asyncPool.ts | 0.00% | 13 Missing :warning: |
src/AjaxUploader.tsx | 85.71% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
看上去得补一些用例,测试覆盖率下降了。
早上试了一下,xhr 请求虽然是异步的不受异步控制,asyncPool
没有发挥作用,需要使用别的方式实现,是否考虑将请求方法改用fetch
?
- xhr 改 fetch 变动会比较大,我不建议为了加新特性动底层。
- 上传逻辑的自定义最灵活的方式是 customRequest,所以是不是做个内置的 concurrencyRequest 方便开发者直接使用就好?
方式 2 确实可能更好。
换种方式实现
relate: https://github.com/ant-design/ant-design/issues/28950