diff --git a/packages/integrations/useAxios/index.ts b/packages/integrations/useAxios/index.ts index 460b1267c32..b3184c4412e 100644 --- a/packages/integrations/useAxios/index.ts +++ b/packages/integrations/useAxios/index.ts @@ -25,11 +25,11 @@ export interface UseAxiosReturn { * Indicates if the request is currently loading */ isLoading: Ref - + /** * Indicates if the request was canceled */ - aborted: Ref + isAborted: Ref /** * Any errors that may have occurred @@ -47,9 +47,14 @@ export interface UseAxiosReturn { finished: Ref /** - * loading alias + * isLoading alias */ loading: Ref + + /** + * isAborted alias + */ + aborted: Ref /** * abort alias @@ -126,7 +131,7 @@ export function useAxios(...args: any[]): OverallUseAxiosReturn & Pr const data = shallowRef() const isFinished = ref(false) const isLoading = ref(false) - const aborted = ref(false) + const isAborted = ref(false) const error = shallowRef>() const cancelToken: CancelTokenSource = axios.CancelToken.source() @@ -135,7 +140,7 @@ export function useAxios(...args: any[]): OverallUseAxiosReturn & Pr return cancelToken.cancel(message) - aborted.value = true + isAborted.value = true isLoading.value = false isFinished.value = false } @@ -178,8 +183,9 @@ export function useAxios(...args: any[]): OverallUseAxiosReturn & Pr isFinished, isLoading, cancel: abort, - canceled: aborted, - aborted, + isAborted, + canceled: isAborted, + aborted: isAborted, abort, execute, } as OverallUseAxiosReturn