<view class="shop_row" wx:for="{{shop}}" data-index='{{index}}' wx:key>
{type: "tap", timeStamp: 5344, target: {…}, currentTarget: {…}, mark: {…}, …}
changedTouches: [{…}]
currentTarget:
dataset: {}
id: ""
offsetLeft: 256
offsetTop: 592
__proto__: Object
detail: {x: 328, y: 608}
mark: {}
target: {id: "", offsetLeft: 256, offsetTop: 592, dataset: {…}}
timeStamp: 5344
touches: [{…}]
type: "tap"
都牛
事件绑定在哪个节点上,就能获取到那个节点的dataset,前提是设置了data-xxx="…"
你事件加在哪的?
你也没绑定事件,做个代码片段
tap是绑在哪个节点上的?