vue-request
vue-request copied to clipboard
[Bug Report]接口报错,但run仍走了resolve
Bug 描述 Bug description
customerEdit是一个promise接口,我如下使用:
const { loading, run: customerEditRun } = useRequest(customerEdit)
customerEditRun(params).then(() => {
// 无论接口正确还是错误全都走到了这里
})
无论接口正确还是错误全都走到了注释位置,但我直接使用customerEdit是没问题的
代码重现 Reproduce
期望结果 Desired result
其他信息 Other information
这是什么版本?v2 的 run 不是 promise 来的
版本:2.0.0-rc.3 仍然返回promise
下版本修复,你用 run 别加 then 就行了