diff --git a/uni_modules/uni-usercapturescreen/changelog.md b/uni_modules/uni-usercapturescreen/changelog.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..71e8ea2c949aab64c12dcea8ee546dc78f1eaa0a 100644 --- a/uni_modules/uni-usercapturescreen/changelog.md +++ b/uni_modules/uni-usercapturescreen/changelog.md @@ -0,0 +1,2 @@ +## 1.0.0(2022-10-26) +支持安卓、iOS、微信小程序平台 diff --git a/uni_modules/uni-usercapturescreen/index.d.ts b/uni_modules/uni-usercapturescreen/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..05119569dcfd12fbe926eeeacd2795c395051646 --- /dev/null +++ b/uni_modules/uni-usercapturescreen/index.d.ts @@ -0,0 +1,16 @@ +type OnUserCaptureScreenCallback = (res?: { errMsg: string }) => void + +declare class Uni { + /** + * 监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件。 + * + * 文档: [https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen) + */ + onUserCaptureScreen(callback: OnUserCaptureScreenCallback): void; + /** + * 用户主动截屏事件。取消事件监听。 + * + * 文档: [https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen) + */ + offUserCaptureScreen(callback: OnUserCaptureScreenCallback): void; +} diff --git a/uni_modules/uni-usercapturescreen/package.json b/uni_modules/uni-usercapturescreen/package.json index 4afe7e3ee8e51b1b77cf12daeb8ba469136f6325..2d527078cbf93c43b77c033c3c2d01843ee041d1 100644 --- a/uni_modules/uni-usercapturescreen/package.json +++ b/uni_modules/uni-usercapturescreen/package.json @@ -4,8 +4,8 @@ "version": "1.0.0", "description": "uni-usercapturescreen", "keywords": [ - "截屏" - ], + "截屏" + ], "repository": "", "engines": { "HBuilderX": "^3.6.0" @@ -24,9 +24,9 @@ "qq": "" }, "declaration": { - "ads": "", - "data": "", - "permissions": "" + "ads": "无", + "data": "插件不采集任何数据", + "permissions": "无" }, "npmurl": "" }, @@ -41,8 +41,8 @@ "encrypt": [], "platforms": { "cloud": { - "tcb": "u", - "aliyun": "u" + "tcb": "y", + "aliyun": "y" }, "client": { "Vue": { @@ -50,36 +50,36 @@ "vue3": "y" }, "App": { - "app-android": "u", - "app-ios": "u" + "app-android": "y", + "app-ios": "y" }, "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" + "Safari": "n", + "Android Browser": "n", + "微信浏览器(Android)": "n", + "QQ浏览器(Android)": "n" }, "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" + "Chrome": "n", + "IE": "n", + "Edge": "n", + "Firefox": "n", + "Safari": "n" }, "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" + "微信": "y", + "阿里": "n", + "百度": "n", + "字节跳动": "n", + "QQ": "n", + "钉钉": "n", + "快手": "n", + "飞书": "n", + "京东": "n" }, "快应用": { - "华为": "u", - "联盟": "u" + "华为": "n", + "联盟": "n" } } } diff --git a/uni_modules/uni-usercapturescreen/readme.md b/uni_modules/uni-usercapturescreen/readme.md index a9d321527993786643c0e055322439da63ce92fb..775241013fe2b973d88bc8c838a747274daff5ff 100644 --- a/uni_modules/uni-usercapturescreen/readme.md +++ b/uni_modules/uni-usercapturescreen/readme.md @@ -1,5 +1,13 @@ -# uts-screenshot-listener -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev) \ No newline at end of file +# uni-usercapturescreen + +### uni.onUserCaptureScreen + +监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件。 + +> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen) + +### uni.offUserCaptureScreen + +用户主动截屏事件。取消事件监听。 + +> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen)