就是uni.setUserCaptureScreen 设置为false 以后,uni.onUserCaptureScreen 就无法监听截屏操作,有什么好的方案处理嘛
onMounted(() => {
// #ifdef APP-PLUS
uni.onUserCaptureScreen(function () {
console.log('用户截屏了')
showScreenshotWarning()
})
uni.setUserCaptureScreen({
enable: false, // 禁止截屏
success() {
console.log('截屏录屏功能已禁用success')
},
fail(err) {
console.error('禁用截屏录屏功能失败fail', err)
},
})
// #endif
})
0 个回复