Do not have detail handler in current
简单的在Demo实例的index.wxml加入了一个view,在其中bindtap=“detailEvent”,然后在对应的index.js里面定义了detailEvent方法,结果在调试点击这个view的时候,console总是不能log,并且console总是提示 “Do not have detail handler in current page: pages/index/index. Please make sure that detail handler has been defined in pages/index/index, or pages/index/index has been added into app.json”这就话。其实我的handler已经定义在了pages/index/index.js,而且pages/index/index也已经加入了app.json中。
具体代码如下: