for循环内绑定tap事件,为什么只有最后一个view能触发事件?
我用for循环写了3个菜单view,然后在for循环内给每个view绑定了tap事件,可是点击的时候发现只有第三个菜单能触发事件,其他两个点击都不能触发,这是为什么?
代码如下:
< view class = "menu-item" wx:for = "{{menuList}}" wx:key = "unique" animation = "{{animationData}}" > < view class = "menu-circle-item" style = "-webkit-transform: rotate({{item.deg}}deg);" data-menu = "{{item.menu}}" data-id = '{{item.id}}' catchtap = 'turntomenu' > < image class = "image-style" src = "{{item.src}}" ></ image >
|