mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-23 07:10:52 +00:00
最近照片推荐组件新增回调接口
Signed-off-by: zhouwenjun1031 <zhouwenjun6@huawei.com>
This commit is contained in:
parent
6cb29d8ef8
commit
50fa7083d9
@ -59,6 +59,16 @@ export declare struct RecentPhotoComponent {
|
||||
* @since 12
|
||||
*/
|
||||
onRecentPhotoClick: RecentPhotoClickCallback;
|
||||
|
||||
/**
|
||||
* Callback when check whether photos or videos exists and return the recent photo info
|
||||
*
|
||||
* @type { ?function }
|
||||
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
onRecentPhotoCheckInfo?: RecentPhotoCheckInfoCallback;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -83,6 +93,18 @@ export type RecentPhotoCheckResultCallback = (recentPhotoExists: boolean) => voi
|
||||
*/
|
||||
export type RecentPhotoClickCallback = (recentPhotoInfo: BaseItemInfo) => boolean;
|
||||
|
||||
/**
|
||||
* The callback of onRecentPhotoCheckInfo event
|
||||
*
|
||||
* @typedef { function } RecentPhotoCheckInfoCallback
|
||||
* @param { boolean } recentPhotoExists - Does the recent photo exist?
|
||||
* @param { RecentPhotoInfo } info - the recent photo info
|
||||
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
export type RecentPhotoCheckInfoCallback = (recentPhotoExists: boolean, info: RecentPhotoInfo) => void;
|
||||
|
||||
/**
|
||||
* RecentPhotoOptions Object
|
||||
*
|
||||
@ -122,6 +144,35 @@ export declare class RecentPhotoOptions {
|
||||
photoSource?: PhotoSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recent photo info
|
||||
*
|
||||
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
export declare class RecentPhotoInfo {
|
||||
/**
|
||||
* The dateTaken of photos or videos
|
||||
*
|
||||
* @type { ?number }
|
||||
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
dateTaken?: number;
|
||||
|
||||
/**
|
||||
* The identifier of photos or videos
|
||||
*
|
||||
* @type { ?string }
|
||||
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
|
||||
* @atomicservice
|
||||
* @since 13
|
||||
*/
|
||||
identifier?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration of PhotoSource type
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user