event.target返回的是點擊的元素節點html
<view class='padd-space' catchtap='editAddress' data-id="{{item.id}}"> <image src='../../images/edit.png'></image> </view>
此時點擊元素img,拿取不到 e.target.dataset.id,但 e.currentTarget.dataset.id 是能夠拿到的 spa
因而可知 二者區分,若是想只拿取 e.target htm
<view class='padd-space' catchtap='deleteAddress'> <image src='../../images/delete.png' data-id="{{item.id}}"></image> </view>
便可。blog