From 0ce16ac8c9c5f6cd2e74576ab476d80776dd5ef5 Mon Sep 17 00:00:00 2001 From: xjccc <546534045@qq.com> Date: Thu, 11 Jul 2024 14:04:37 +0800 Subject: [PATCH] docs: deprecate pending and emphasis undefined (#28113) --- docs/1.getting-started/6.data-fetching.md | 2 +- packages/nuxt/src/app/nuxt.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/1.getting-started/6.data-fetching.md b/docs/1.getting-started/6.data-fetching.md index 005dbb27f7..1b6fc9bb34 100644 --- a/docs/1.getting-started/6.data-fetching.md +++ b/docs/1.getting-started/6.data-fetching.md @@ -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"`). diff --git a/packages/nuxt/src/app/nuxt.ts b/packages/nuxt/src/app/nuxt.ts index 9b49116b0e..867fc08502 100644 --- a/packages/nuxt/src/app/nuxt.ts +++ b/packages/nuxt/src/app/nuxt.ts @@ -123,6 +123,9 @@ interface _NuxtApp { /** @internal */ _asyncData: Record + /** + * @deprecated This may be removed in a future major version. + */ pending: Ref error: Ref status: Ref