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

事件处理函数命名bug #383

Closed
iisbigfish opened this issue Jul 25, 2018 · 2 comments
Closed

事件处理函数命名bug #383

iisbigfish opened this issue Jul 25, 2018 · 2 comments

Comments

@iisbigfish
Copy link

问题描述
[问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚]

复现步骤
[复现问题的步骤]
如果函数名字 /handleClickNavigateTo为这个时,编译报错。改变函数名字报错消失。
[或者可以直接贴源代码,能贴文字就不要截图]

// 这里可以贴代码
 // 处理函数
  handleClickNavigateTo (url) {
    console.log(url)
  }
组件里的 render 函数
render () {
<View className='head' onClick={this.handleClickNavigateTo.bind(this, 'item.url')}>test</View>
}

期望行为
[这里请用简洁清晰的语言描述你期望的行为]

报错信息

界面报错信息:
image
控制台报错信息:
image
系统信息

  • 操作系统: [MacOS]
  • Taro 版本 [v.0.0.72]
  • Node.js 版本 [v8.11.3]

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

@luckyadam
Copy link
Member

hello~ handleClickNavigateTo 这个函数名过长了,导致超出了小程序的限制

@cheese-git
Copy link
Contributor

同样遇到了类似的问题

希望能有相应的错误提示或写入文档,这种 bug 真的很难发现 😿

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