We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
希望 run 返回 Promise,现在无论执行成功与否都会走到 then
比如批量删除和删除使用同一个请求,但返回后触发不同操作,不适用 onSuccess
run({}).then(res => { // do something }).catch(err => {})
The text was updated successfully, but these errors were encountered:
onSuccess 和 onError本质上对应的就是 run 的 then 和 catch。你直接在 onSuccess 里面处理业务就好了。run.then 不建议直接使用,有些特殊情况then的res的值会是null,参考:https://www.attojs.org/zh/api/#run
onSuccess
onError
run
then
catch
run.then
res
null
Sorry, something went wrong.
使用 axios resolve() 的时候没有触发onSuccess 反而触发了 onError 是设计如此吗?
新开一个 issue,提供一个重现 demo。
No branches or pull requests
需求描述 Feature Description
希望 run 返回 Promise,现在无论执行成功与否都会走到 then
比如批量删除和删除使用同一个请求,但返回后触发不同操作,不适用 onSuccess
建议的解决方案 Proposed Solution
其他信息 Other information
The text was updated successfully, but these errors were encountered: