@vtj / utils / IRequestSettings
Interface: IRequestSettings
Defined in: packages/utils/src/request.ts:63
Indexable
[index
: string
]: any
Properties
failMessage?
optional
failMessage:boolean
Defined in: packages/utils/src/request.ts:101
显示失败提示
headers?
optional
headers:Partial
<RawAxiosHeaders
&object
&object
> | (id
,config
,settings
) =>Partial
<RawAxiosHeaders
&object
&object
>
Defined in: packages/utils/src/request.ts:77
自定义请求头
hideLoading()?
optional
hideLoading: () =>void
Defined in: packages/utils/src/request.ts:96
关闭 loading
Returns
void
injectHeaders?
optional
injectHeaders:boolean
Defined in: packages/utils/src/request.ts:72
是否注入自定义的请求头
loading?
optional
loading:boolean
Defined in: packages/utils/src/request.ts:87
是否显示 loading
originResponse?
optional
originResponse:boolean
Defined in: packages/utils/src/request.ts:111
返回原始 axios 响应对象
showError()?
optional
showError: (msg
,e
) =>void
Defined in: packages/utils/src/request.ts:106
自定义失败提示
Parameters
msg
string
e
any
Returns
void
showLoading()?
optional
showLoading: () =>void
Defined in: packages/utils/src/request.ts:92
显示 loading
Returns
void
skipWarn?
optional
skipWarn:IRequestSkipWarn
Defined in: packages/utils/src/request.ts:126
请求响应警告执行程序插件
type?
optional
type:"data"
|"json"
|"form"
Defined in: packages/utils/src/request.ts:67
发送数据类型
validate()?
optional
validate: (res
) =>boolean
Defined in: packages/utils/src/request.ts:121
自定义校验方法
Parameters
res
AxiosResponse
Returns
boolean
validSuccess?
optional
validSuccess:boolean
Defined in: packages/utils/src/request.ts:116
校验响应成功