Comments (24)
这个是不是要在 README.md 中特性部分进行体现呢 😂,暂时没有实现 axios onUploadProgress
以及 XMLHttpRequest: progress event
from umi-request.
有一个 issue 在跟进中,但现在还没有实现,我会继续关注。 whatwg/fetch#607
from umi-request.
使用中间件 umi-request-progress可完美解决上传进度和下载进度的问题,步骤如下:
- 安装
npm install umi-request-progress
; - 使用:
//导入 umi-request
import request from 'umi-request';
//导入 umi-request-progress
import progressMiddleware from 'umi-request-progress';
// 注册内核中间件
request.use(progressMiddleware, { core: true });
// 上传文件
request("/file/upload",{
...otherOptions,
//上传进度事件的回调函数
onReqProgress:function( ev: ProgressEvent){
console.log(ev)
},
//下载进度事件的回调函数
onResProgress:function( ev: ProgressEvent){
console.log(ev)
},
});
from umi-request.
+3
from umi-request.
有什么新进展么?
from umi-request.
有进展么?
from umi-request.
这个可以customRequest自定义上传然后用OnProgress控制进度,虽然文档没写但是有个这个OnProgress方法的。
from umi-request.
这个可以customRequest自定义上传然后用OnProgress控制进度,虽然文档没写但是有个这个OnProgress方法的。
问题是你怎么去拿进度,而不是用进度。。。
from umi-request.
这个可以customRequest自定义上传然后用OnProgress控制进度,虽然文档没写但是有个这个OnProgress方法的。
问题是你怎么去拿进度,而不是用进度。。。
都自己上传了还拿不到进度?
from umi-request.
- 1
from umi-request.
+1
from umi-request.
有进展吗?都多久了
from umi-request.
有进展吗
from umi-request.
+1
from umi-request.
+1
from umi-request.
+2
from umi-request.
+4
from umi-request.
+5
from umi-request.
+6
from umi-request.
+7
from umi-request.
+8
from umi-request.
+9
from umi-request.
+10
from umi-request.
+11
from umi-request.
Related Issues (20)
- 好好的axios让你们封装成了依托答辩,真的是服了 HOT 1
- 请求成功还是触发了timeout
- stream类型支持吗 HOT 1
- 用在小程序上可以吗 HOT 5
- 1
- 1
- How to use RequestConfig based on @umijs/max to make the front end insensitive to refresh tokens
- 使用vite,在修改页面后,接口出现errorHandler.ts:37 TypeError: response.clone is not a function的报错,但是刷新一下页面报错就没了,请问是什么原因
- 引用链接失效
- 我试图在RequestConfig中修改headers的Content-Type,可这样始终无法生效 HOT 1
- 不使用umi全家桶单独使用umi-request 如何使用mock.js 拦截请求? HOT 1
- 请求设置 requestType: 'form' 无效 HOT 1
- umi-request在next.js中可以使用吗?
- 请求时怎么配置忽略SSL校验 HOT 1
- Can 'GET' use with data ?
- umijs 的request怎么监听响应码302 重定向的状态呢?
- 项目爆了
- 突然无法使用
- 忽略ssl校验
- request.interceptors.response 无法获取headers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umi-request.