interface.uts 1.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
export type ChooseSystemImageSuccessResult = {
	filePaths : Array<string>
}
export type ImageErrorCode = 2101001 | 2101010 | 2101002
export interface ChooseSystemImageError extends IUniError {
	errCode : ImageErrorCode
};
export type ChooseSystemImageSuccessCallback = (result : ChooseSystemImageSuccessResult) => void
export type ChooseSystemImageFailResult = ChooseSystemImageError
export type ChooseSystemImageFailCallback = (result : ChooseSystemImageFailResult) => void
export type ChooseSystemImageCompleteCallback = (callback : any) => void

export type ChooseSystemImageOptions = {
	count : number,
	success ?: ChooseSystemImageSuccessCallback | null,
	fail ?: ChooseSystemImageFailCallback | null,
	complete ?: ChooseSystemImageCompleteCallback | null
}

张磊 已提交
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
export type ChooseSystemImage = (options : ChooseSystemImageOptions) => void

export type ChooseSystemMediaSuccessResult = {
	filePaths : Array<string>
}
export type ChooseSystemMediaSuccessCallback = (result : ChooseSystemMediaSuccessResult) => void
export type ChooseSystemMediaFailResult = ChooseSystemImageError
export type ChooseSystemMediaFailCallback = (result : ChooseSystemMediaFailResult) => void
export type ChooseSystemMediaCompleteCallback = (callback : any) => void
export type ChooseSystemMediaOptions = {
	count : number,
	mediaType ?: Array<string> | null,
	pageOrientation ?: string | null,
	success ?: ChooseSystemMediaSuccessCallback | null,
	fail ?: ChooseSystemMediaFailCallback | null,
	complete ?: ChooseSystemMediaCompleteCallback | null
}

export type ChooseSystemMedia = (options : ChooseSystemMediaOptions) => void