VM309:1 Component "pages/a/a" does not have a method "a" to handle event "tap".
源代码如下:<view class="fl aside">
<view class="aside-item {{item.isActive ? 'active' : ''}}" wx:for="{{asideData}}" wx:key="index" data-active="{{item.isActive}}" data-index="{{index}}" bindtap="a">{{item.title}}</view>
你好,是对应的js文件没有定义这个方法
console.log('e ==> ',e);
if (e.currentTarget.dataet.active) {
return;
}
for (let i = 0; i < this.data.asideData.length; i++ ) {
if(this.data.asideData[i].isActive) {
this.data.asideData[i].isActive = false;
break;
}
}
this.data.asideData[e.currentTarget.dataset.index].isActive=true;
this.setData({
asideData: this.data.asideData
})
}
我是看到教程也是这样的啊