diff --git a/cocos/native-binding/impl.ts b/cocos/native-binding/impl.ts index 6cdb99890c..8f143d55bc 100644 --- a/cocos/native-binding/impl.ts +++ b/cocos/native-binding/impl.ts @@ -6,4 +6,5 @@ export const native = { zipUtils: globalJsb.zipUtils, fileUtils: globalJsb.fileUtils, DebugRenderer: globalJsb.DebugRenderer, + copyTextToClipboard: globalJsb.copyTextToClipboard?.bind(globalJsb), }; diff --git a/cocos/native-binding/index.ts b/cocos/native-binding/index.ts index f920bde7a6..b9f5c76f43 100644 --- a/cocos/native-binding/index.ts +++ b/cocos/native-binding/index.ts @@ -36,6 +36,12 @@ export declare namespace native { */ export type DownloaderTask = { requestURL: string, storagePath: string, identifier: string }; + /** + * @en Copy text to clipboard @zh 拷贝字符串到剪切板 + * @param text + */ + export function copyTextToClipboard(text:string): void; + /** * @en DownloaderHints @zh 下载任务的配置接口 * @param countOfMaxProcessingTasks