导航

    Taro 社区

    Taro

    • 注册
    • 登录
    • 搜索
    • 版块
    • 最新
    • 话题
    • 热门
    • 群组
    1. 主页
    2. jd_67b9cf1a538f7
    3. 帖子
    J
    • 资料
    • 关注
    • 粉丝
    • 主题
    • 帖子
    • 最佳
    • 群组

    jd_67b9cf1a538f7 发布的帖子

    • RE: taro 中使用 Camera调用失败

      问题已解决:
      onScancode={this.handleScan} 监听扫描成功的方法
      【taro官方文档没有更新】

      发布在 提 Bug
      J
      jd_67b9cf1a538f7
    • taro 中使用 Camera调用失败

      感觉代码上没有什么问题,代码如下

      <Camera device-position='back' mode='scanCode' bindscancode={this.handleScan} flash='off' style='width: 100%; height: 100%;' />
      
        constructor(props) {
          super(props);
          this.state = {
          }
      
          this.getUser = this.getUser.bind(this)
          this.handleScan = this.handleScan.bind(this)
        }
      
        getUser() {
          console.log('user')
        }
        handleScan(e) {
          console.log(e)
        }
      
      

      真机调试的问题:
      8be8d796-bbd9-47ed-a390-8a19a59ad7b9-image.png

      求助一下这个怎么解决

      发布在 提 Bug
      J
      jd_67b9cf1a538f7