Interface: IStaticRequest()<R, D>
Defined in: packages/utils/src/request.ts:476
Extends
Type Parameters
• R = any
• D = any
IStaticRequest(
options
):Promise
<R
>
Defined in: packages/utils/src/request.ts:477
Parameters
options
Returns
Promise
<R
>
Properties
axios
axios:
AxiosInstance
Defined in: packages/utils/src/request.ts:155
Inherited from
instance
instance:
Request
Defined in: packages/utils/src/request.ts:478
isLoading
isLoading:
boolean
=false
Defined in: packages/utils/src/request.ts:158
Inherited from
records
records:
Record
<string
,IRequestRecord
> ={}
Defined in: packages/utils/src/request.ts:157
Inherited from
settings
settings:
IRequestSettings
Defined in: packages/utils/src/request.ts:156
Inherited from
Methods
cancel()
cancel(
id
?,message
?):void
Defined in: packages/utils/src/request.ts:197
Parameters
id?
string
message?
string
= '请求已取消'
Returns
void
Inherited from
send()
send<
R
,D
>(options
,isSkipWarn
):Promise
<R
>
Defined in: packages/utils/src/request.ts:359
Type Parameters
• R = any
• D = any
Parameters
options
IRequestConfig
<D
> = {}
isSkipWarn
boolean
= false
Returns
Promise
<R
>
Inherited from
setConfig()
setConfig(
options
):void
Defined in: packages/utils/src/request.ts:187
Parameters
options
IRequestOptions
= {}
Returns
void
Inherited from
useRequest()
useRequest(
onFulfilled
?,onRejected
?): () =>void
Defined in: packages/utils/src/request.ts:424
Parameters
onFulfilled?
null
| (value
) => InternalAxiosRequestConfig
| Promise
<InternalAxiosRequestConfig
>
onRejected?
null
| (error
) => any
Returns
Function
Returns
void
Inherited from
useResponse()
useResponse(
onFulfilled
?,onRejected
?): () =>void
Defined in: packages/utils/src/request.ts:413
Parameters
onFulfilled?
null
| (value
) => AxiosResponse
| Promise
<AxiosResponse
>
onRejected?
null
| (error
) => any
Returns
Function
Returns
void