小程序冒泡事件数据获取失败怎么办?
例如这样一个例子
< view class = "userinfo" data-id = "1" bindtap = "clickthis" > < view class = "user-img" > < image class = "u-image" mode = "scaleToFill" src = "test.jpg" ></ image > </ view > </ view > |
如果点击图片的时候,事件会冒泡到clickthis,但是获取 event.target.dataset.id的时候获取不到