Replies: 1 comment
-
|
仔细想了下这个可能是个伪需求,第一次请求也不准确,需要的是第一次成功请求,而第一次成功请求可以通过data上面做点手脚就能表达,然后包一层处理一下这个loading的返回逻辑,把data的状态传进去,这样就可以外表不变,而通过一个额外的参数来控制loading返回逻辑,就跟useRequest本身没什么关系了 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
做监控页面,希望没有数据的时候有loading 效果,第一次请求之后或者判断有数据之后,可以不用loading,这个时候需要hack这个loading的返回值,在useRequest里面有方案么
Beta Was this translation helpful? Give feedback.
All reactions