iOS 闪光灯打不开
发布于 6 年前 作者 luming 235 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径

iOS闪光灯打开没反应,Android可以

  • 提供一个最简复现 Demo

<camera device-position=“back” flash="{{flash}}" binderror=“error” style=“width: 100%; height: 300px;”

   mode=‘scanCode’

   bindscancode=“bindscancode”

   ></camera>

takePhoto() {

   // auto, on, off

   let flash = this.data.flash == ‘on’ ? ‘off’ : ‘on’

   this.setData({

     flash

   })

   console.log(‘flash :’, this.data.flash)

 }

iPhone 6s Plus

iOS 12.0

6.7.3

2.4.0 [191]

2 回复

使用官网的案例是可以的,建议检查下代码:测试机型:iPhonexr,微信版本:6.7.3

代码就这些,都没错呢

回到顶部