-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
微信小程序转taro然后taro转换成微信小程序所有组件点击时报错Cannot read property 'apply' of undefined #2141
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
请提供一下微信小程序源码 |
请问楼主解决了吗 |
没有解决,之前忙,没有看这个问题 |
应该是组件里用到的方法没有定义造成的,我这边也遇到了类似的问题,检查了一下发现是组件里用到的一个方法没有定义,才出现这样的错误提示! |
我这里也复现这个问题。 |
箭头函数貌似可以解决这个问题: |
嗯,剪头函数确实可以解决这个问题!
获取 Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: 王静 <[email protected]>
Sent: Wednesday, July 3, 2019 3:40:40 PM
To: NervJS/taro <[email protected]>
Cc: Xiaolong Lin <[email protected]>; Comment <[email protected]>
Subject: Re: [NervJS/taro] 微信小程序转taro然后taro转换成微信小程序所有组件点击时报错Cannot read property 'apply' of undefined (#2141)
箭头函数貌似可以解决这个问题:
举个栗子额:
将 onClick={onClick.bind(this, props)} 改为 onClick={() => onClick(props) }
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#2141?email_source=notifications&email_token=AGNUQWUHPLBOJ5HYRQRL6JLP5RJXRA5CNFSM4GWW3AWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZDSJFI#issuecomment-507978901>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AGNUQWS4CHJJRECVL6ECYCDP5RJXRANCNFSM4GWW3AWA>.
|
问题描述
微信小程序转taro然后taro转换成微信小程序点击组件时报错,所有组件点击事件都报这个错:
系统信息
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
The text was updated successfully, but these errors were encountered: