Skip to content

Commit fb46b90

Browse files
authored
docs: fix context
docs: fix context
2 parents 7bf9806 + 6ef15b5 commit fb46b90

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/hooks/src/useRequest/docs/basic/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const {
184184
| data | Data returned by service | `Ref<TData>` \| `undefined` |
185185
| error | Exception thrown by service | `Ref<Error>` \| `undefined` |
186186
| loading | Is the service being executed | `Ref<boolean>` |
187-
| params | An array of parameters for the service being executed. For example, you triggered `run(1, 2, 3)`, then params is equal to `[1, 2, 3]` | `Ref<TParams | []>` |
187+
| params | An array of parameters for the service being executed. For example, you triggered `run(1, 2, 3)`, then params is equal to `[1, 2, 3]` | `Ref<TParams \| []>` |
188188
| run | <ul><li> Manually trigger the execution of the service, and the parameters will be passed to the service</li><li>Automatic handling of exceptions, feedback through `onError`</li></ul> | `(...params: TParams) => void` |
189189
| runAsync | The usage is the same as `run`, but it returns a Promise, so you need to handle the exception yourself. | `(...params: TParams) => Promise<TData>` |
190190
| refresh | Use the last params, call `run` again | `() => void` |

packages/hooks/src/useRequest/docs/basic/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ const {
181181
| data | service 返回的数据 | `Ref<TData>` \| `undefined` |
182182
| error | service 抛出的异常 | `Ref<Error>` \| `undefined` |
183183
| loading | service 是否正在执行 | `Ref<boolean>` |
184-
| params | 当次执行的 service 的参数数组。比如你触发了 `run(1, 2, 3)`,则 params 等于 `[1, 2, 3]` | `Ref<TParams | []>` |
184+
| params | 当次执行的 service 的参数数组。比如你触发了 `run(1, 2, 3)`,则 params 等于 `[1, 2, 3]` | `Ref<TParams \| []>` |
185185
| run | <ul><li> 手动触发 service 执行,参数会传递给 service</li><li>异常自动处理,通过 `onError` 反馈</li></ul> | `(...params: TParams) => void` |
186186
| runAsync |`run` 用法一致,但返回的是 Promise,需要自行处理异常。 | `(...params: TParams) => Promise<TData>` |
187187
| refresh | 使用上一次的 params,重新调用 `run` | `() => void` |

0 commit comments

Comments
 (0)