Component “custom-tab-bar/index“ does not have a method “onChange“ to handle event “change“.

微信小程序报错:Component "custom-tab-bar/index" does not have a method "onChange" to handle event "change".

原因:

 onChange未正确写入到组件里的method中

解决:

将onChange方法正确写入method。

注意:组件和页面的方法防止位置不要记混!!

 

猜你喜欢

转载自blog.csdn.net/weixin_56035334/article/details/127705934