Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

找不到函数 #3859

Closed
kennir opened this issue Jul 16, 2019 · 5 comments
Closed

找不到函数 #3859

kennir opened this issue Jul 16, 2019 · 5 comments
Assignees

Comments

@kennir
Copy link

kennir commented Jul 16, 2019

问题描述
使用第三方组件绘图后需要回调绘图成功的时间,代码如下:

HTML

class CheckIn extends Component {
  handleOnImgOK(e) {
    Taro.hideLoading()

      ...
  }
  
  render() {
    return (
         <View className='.canvas'>
          <painter customStyle='left: -9999rpx'
            dirty
            palette={this.state.palette}
            onImgErr={this.handleOnImgErr.bind(this)}
            onImgOK={this.handleOnImgOK.bind(this)}
          />
        </View>
   )
}

复现步骤

// ```js
  handleOnImgOK(e) {
    Taro.hideLoading()

      ...
  }
// ```

// 提供完整可复现的代码和整理好代码格式,有助于我们快速定位问题,节省你我时间。
// 代码提供不全或代码格式混乱的 issues 【有可能被忽略】,烦请各位注意。

期望行为
成功回调 handleOnImgOK

报错信息

[这里请贴上你的完整报错截图或文字]

VM1614:1 Component "pages/checkin/index" does not have a method "handleOnImgOK.bind(this)" to handle event "imgOK".

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

Taro 1.3.9

补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]

Taro 1.2.17编译出来的没有问题

@taro-bot
Copy link

taro-bot bot commented Jul 16, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 16, 2019

@kennir 什么平台

@kennir
Copy link
Author

kennir commented Jul 17, 2019

@kennir 什么平台

微信小程序

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 17, 2019

@kennir CLI 和依赖是不是同一版本,这个组件编译后的 wxml 截图看看。

@taro-bot
Copy link

taro-bot bot commented Jul 17, 2019

CC @yuche

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants