export interface Uni { /** * 设置系统剪贴板的内容 * * @tutorial https://uniapp.dcloud.net.cn/api/system/clipboard.html#setclipboarddata * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/clipboard.html#setclipboarddata * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * }, * "harmony": { * "osVer": "3.0", * "uniVer": "4.23", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ setClipboardData: SetClipboardData; /** * 获得系统剪贴板的内容 * * @tutorial https://uniapp.dcloud.net.cn/api/system/clipboard.html#getclipboarddata * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/clipboard.html#getclipboarddata * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * }, * "harmony": { * "osVer": "3.0", * "uniVer": "4.23", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "√" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ getClipboardData: GetClipboardData; } export type SetClipboardData = (options: SetClipboardDataOptions) => void; export type SetClipboardDataSuccess = {}; export type SetClipboardDataSuccessCallback = (result: SetClipboardDataSuccess) => void; export type SetClipboardDataFail = UniError; export type SetClipboardDataFailCallback = (result: SetClipboardDataFail) => void; export type SetClipboardDataComplete = any; export type SetClipboardDataCompleteCallback = (result: SetClipboardDataComplete) => void; export type SetClipboardDataOptions = { /** * 需要设置的内容 */ data: string, /** * 是否弹出提示,默认弹出提示 * @type boolean */ showToast?: boolean | null, /** * 成功返回的回调函数 */ success?: SetClipboardDataSuccessCallback | null, /** * 失败的回调函数 */ fail?: SetClipboardDataFailCallback | null, /** * 结束的回调函数(调用成功、失败都会执行) */ complete?: SetClipboardDataCompleteCallback | null }; export type GetClipboardData = (options: GetClipboardDataOptions) => void; export type GetClipboardDataSuccess = { /** * 剪贴板的内容 */ data: string }; export type GetClipboardDataSuccessCallback = (result: GetClipboardDataSuccess) => void; export type GetClipboardDataFail = UniError; export type GetClipboardDataFailCallback = (result: GetClipboardDataFail) => void; export type GetClipboardDataComplete = any; export type GetClipboardDataCompleteCallback = (result: GetClipboardDataComplete) => void; export type GetClipboardDataOptions = { /** * 成功返回的回调函数 */ success?: GetClipboardDataSuccessCallback | null, /** * 失败的回调函数 */ fail?: GetClipboardDataFailCallback | null, /** * 结束的回调函数(调用成功、失败都会执行) */ complete?: GetClipboardDataCompleteCallback | null };