-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请求发生错误时怎么取消loading? #1580
Comments
try catch 捕获掉后这个 effects 就会结束了,然后 loading 也就结束了 |
要每个请求都要写吗?有没有全局的捕获方法? |
试试全局写一个 onError 。 |
@sorrycc 我也遇到过这个问题,花了点功夫才找到答案,加上了一个空的onError。 |
@woshiguabi 空的onError加在哪里? |
在app.js中添加
对吧? |
在这个onError 中主要能处理哪些场景呢? |
const app = dva({ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
使用dva2时dva对loading的处理很方便,但发现请求发生错误时loading没法取消,怎么解决?
The text was updated successfully, but these errors were encountered: