1 个回答

你的代码就是这样执行的当然点击拍照会画三张,如果你右边只有三个容器建议用一个下标变量实现
,定义一个index初始值为0

drawImage(){
  index = index + 1 > 3 ? 1 : index + 1;
  this['thisContext' + index].drawImage(
    this.thisVideo,
    0,
    0,
    this.canvasWidth,
    this.canvasHeight
  )
}
推荐问题