docs: deprecate pending and emphasis undefined (#28113)

This commit is contained in:
xjccc 2024-07-11 14:04:37 +08:00 committed by GitHub
parent 72a94881b6
commit c5a50de6d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -157,7 +157,7 @@ Read more about `useAsyncData`.
- `data`: the result of the asynchronous function that is passed in.
- `refresh`/`execute`: a function that can be used to refresh the data returned by the `handler` function.
- `clear`: a function that can be used to set `data` to undefined, set `error` to `null`, set `status` to `idle`, and mark any currently pending requests as cancelled.
- `clear`: a function that can be used to set `data` to `undefined`, set `error` to `null`, set `status` to `idle`, and mark any currently pending requests as cancelled.
- `error`: an error object if the data fetching failed.
- `status`: a string indicating the status of the data request (`"idle"`, `"pending"`, `"success"`, `"error"`).

View File

@ -121,6 +121,9 @@ interface _NuxtApp {
/** @internal */
_asyncData: Record<string, {
data: Ref<unknown>
/**
* @deprecated This may be removed in a future major version.
*/
pending: Ref<boolean>
error: Ref<Error | undefined>
status: Ref<AsyncDataRequestStatus>