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

小程序生命周期的方法onLoad,onShow等在其他方法内调用时没有转义成taro框架的对应的生命周期方法名 #2183

Closed
luodanyalian opened this issue Feb 15, 2019 · 5 comments
Assignees

Comments

@luodanyalian
Copy link

小程序生命周期的方法onLoad,onShow等在其他方法内调用时没有转义成componentWillMount这种的名字,比如下拉刷新的时候我就会调用这种方法

image

System:
OS: macOS 10.14
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
Yarn: 1.9.4 - ~/.nvm/versions/node/v8.11.3/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.11.3/bin/npm

  • 报错平台 [ weapp]
@taro-bot
Copy link

taro-bot bot commented Feb 15, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@yuche
Copy link
Contributor

yuche commented Feb 18, 2019

你是自己写的 onLoad 方法还是使用 taro convert 转换的?

@luodanyalian
Copy link
Author

taro convert转换的

@yuche
Copy link
Contributor

yuche commented Feb 18, 2019

那你要带上源码或者复现和你 taro 的版本

@luodanyalian
Copy link
Author

源码:

/**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    // console.log(111);
    wx.showNavigationBarLoading();
    this.onLoad();
    this.onShow();
    wx.stopPullDownRefresh();
    wx.hideNavigationBarLoading();
  }

Taro v1.2.12

@yuche yuche added the taroize label Feb 18, 2019
@yuche yuche self-assigned this Feb 18, 2019
@yuche yuche closed this as completed in 4b75433 Feb 18, 2019
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

2 participants