在camera组件中控制flash属性on/off。苹果系统中,当flash=on时,屏幕会变成白屏模拟闪光等的效果。但是在安卓系统中,没有改效果。
<camera mode="normal" class="cameras" :device-position="position" :flash="flash" @error="error" style="width: 100%; height: 100vh">
export default {
data() {
return {
flash: 'on',
position: 'front'
}
},
onShow: function() {
},
methods: {
flashOn() {
this.flash = 'on'
},
flashOff() {
this.flash = 'off'
},
}
}
1 个回复
2***@qq.com (作者)
已解决