Appearance
类型: BaseOperation
属性
getServerDate
• getServerDate: () => Promise
<Dayjs
>
Type declaration
▸ (): Promise
<Dayjs
>
返回值
Promise
<Dayjs
>
packages/uni-mp/io/types/base.d.ts:60
uploadFile
• uploadFile: (params
: FileParams
, options
: FileMeta
& { isMultipart
: boolean
; throwIfFailed
: boolean
}) => Promise
<UploadFileResponse
>
Type declaration
▸ (params
, options
): Promise
<UploadFileResponse
>
参数
Name | Type |
---|---|
params | FileParams |
options | FileMeta & { isMultipart : boolean ; throwIfFailed : boolean } |
返回值
Promise
<UploadFileResponse
>
packages/uni-mp/io/types/base.d.ts:42
uploadFiles
• uploadFiles: (params
: FileParams
[], options
: FileMeta
& { isMultipart
: boolean
; throwIfFailed
: boolean
}) => Promise
<UploadFileResponse
[]>
Type declaration
▸ (params
, options
): Promise
<UploadFileResponse
[]>
参数
Name | Type |
---|---|
params | FileParams [] |
options | FileMeta & { isMultipart : boolean ; throwIfFailed : boolean } |
返回值
Promise
<UploadFileResponse
[]>
packages/uni-mp/io/types/base.d.ts:55
useMutation
• useMutation: <T>(options
: T
) => UseMutationReturnType
<unknown
, IOError
, unknown
, unknown
>
Type declaration
▸ <T
>(options
): UseMutationReturnType
<unknown
, IOError
, unknown
, unknown
>
Type parameters
Name | Type |
---|---|
T | extends UseMutationOptions |
参数
Name | Type |
---|---|
options | T |
返回值
UseMutationReturnType
<unknown
, IOError
, unknown
, unknown
>
packages/uni-mp/io/types/base.d.ts:71
useQuery
• useQuery: <T>(requestFn
: T
, queryOptions?
: UseQueryOptions
, queryClient?
: QueryClient
) => UseQueryReturnType
<Awaited
<ReturnType
<T
>>, unknown
>
Type declaration
▸ <T
>(requestFn
, queryOptions?
, queryClient?
): UseQueryReturnType
<Awaited
<ReturnType
<T
>>, unknown
>
Type parameters
Name | Type |
---|---|
T | extends QueryFunction |
参数
Name | Type |
---|---|
requestFn | T |
queryOptions? | UseQueryOptions |
queryClient? | QueryClient |
返回值
UseQueryReturnType
<Awaited
<ReturnType
<T
>>, unknown
>
packages/uni-mp/io/types/base.d.ts:75
useQueryAll
• useQueryAll: <T>(tasks
: [...T[]], queryOptions?
: UseQueryOptions
, queryClient?
: QueryClient
) => Omit
<UseQueryReturnType
<unknown
, unknown
>, "data"
> & { data
: ToRefs
<{ [K in string | number | symbol]: Awaited<ReturnType<T[K<K>]>> }> }
Type declaration
▸ <T
>(tasks
, queryOptions?
, queryClient?
): Omit
<UseQueryReturnType
<unknown
, unknown
>, "data"
> & { data
: ToRefs
<{ [K in string | number | symbol]: Awaited<ReturnType<T[K<K>]>> }> }
Type parameters
Name | Type |
---|---|
T | extends (...any : any ) => Promise <any >[] |
参数
Name | Type |
---|---|
tasks | [...T[]] |
queryOptions? | UseQueryOptions |
queryClient? | QueryClient |
返回值
Omit
<UseQueryReturnType
<unknown
, unknown
>, "data"
> & { data
: ToRefs
<{ [K in string | number | symbol]: Awaited<ReturnType<T[K<K>]>> }> }
packages/uni-mp/io/types/base.d.ts:81
useQueryAllSettled
• useQueryAllSettled: <T>(tasks
: [...T[]], queryOptions?
: UseQueryOptions
, queryClient?
: QueryClient
) => Omit
<UseQueryReturnType
<unknown
, unknown
>, "data"
> & { data
: ToRefs
<{ [K in string | number | symbol]: PromiseSettledResult<T[K<K>]> }> }
Type declaration
▸ <T
>(tasks
, queryOptions?
, queryClient?
): Omit
<UseQueryReturnType
<unknown
, unknown
>, "data"
> & { data
: ToRefs
<{ [K in string | number | symbol]: PromiseSettledResult<T[K<K>]> }> }
Type parameters
Name | Type |
---|---|
T | extends (...any : any ) => Promise <any >[] |
参数
Name | Type |
---|---|
tasks | [...T[]] |
queryOptions? | UseQueryOptions |
queryClient? | QueryClient |
返回值
Omit
<UseQueryReturnType
<unknown
, unknown
>, "data"
> & { data
: ToRefs
<{ [K in string | number | symbol]: PromiseSettledResult<T[K<K>]> }> }
packages/uni-mp/io/types/base.d.ts:89
useRequest
• useRequest: <T>(request
: T
, requestParams
: Parameters
<T
>["0"
], queryOptions
: UseQueryOptions
) => UseQueryReturnType
<Partial
<Awaited
<ReturnType
<T
>>>, IOError
> & { queryKey
: QueryKey
}
Type declaration
▸ <T
>(request
, requestParams
, queryOptions
): UseQueryReturnType
<Partial
<Awaited
<ReturnType
<T
>>>, IOError
> & { queryKey
: QueryKey
}
Type parameters
Name | Type |
---|---|
T | extends (...any : any ) => any |
参数
Name | Type |
---|---|
request | T |
requestParams | Parameters <T >["0" ] |
queryOptions | UseQueryOptions |
返回值
UseQueryReturnType
<Partial
<Awaited
<ReturnType
<T
>>>, IOError
> & { queryKey
: QueryKey
}
packages/uni-mp/io/types/base.d.ts:65
useServerDate
• useServerDate: (options?
: UseServerDateOptions
) => Ref
<Dayjs
>
Type declaration
▸ (options?
): Ref
<Dayjs
>
参数
Name | Type |
---|---|
options? | UseServerDateOptions |
返回值
Ref
<Dayjs
>
packages/uni-mp/io/types/base.d.ts:63
Accessors
file
• get
file(): File
返回值
packages/uni-mp/io/types/base.d.ts:40
query
• get
query(): Query
返回值
packages/uni-mp/io/types/base.d.ts:36
user
• get
user(): User
返回值
packages/uni-mp/io/types/base.d.ts:38