Authored by yyq

fix del action

... ... @@ -102,8 +102,8 @@ Component({
this.triggerEvent('removeGoodsListInEdit', item);
this.setData({item});
},
touchChanged(key) {
if (this.isShowMore() && key !== this.data.item.indexKey) {
touchChanged(e) {
if (this.isShowMore() && e.target.dataset.key !== this.data.item.indexKey) {
this.toggleAnimation(false);
}
},
... ... @@ -195,8 +195,8 @@ Component({
let currentPage = pages[pages.length - 1];
if (currentPage && currentPage.event && currentPage.event.on) {
currentPage.event.on('cart-touch-start', key => {
this.touchChanged(key);
currentPage.event.on('cart-touch-start', e => {
this.touchChanged(e);
});
}
}
... ...
... ... @@ -161,7 +161,7 @@ Page({
});
},
touchStartAction(e) {
this.event.emit('cart-touch-start', `wrap${e.timeStamp}`);
this.event.emit('cart-touch-start', e);
},
showMorePromotion(e) {
let pid = e.currentTarget.dataset.pid;
... ...
<template name="cartGoodsList">
<block wx:if="{{goodsList.length}}">
<block wx:for="{{goodsList}}" wx:key="unique">
<cart-item goods="{{item}}" index="{{index}}" isEditing="{{isEditing}}" isEditSelectAll="{{isEditSelectAll}}" isInvalid="{{isInvalid}}" bind:chooseGoodsItem="chooseGoodsItem" bind:removeGoodsListInEdit="removeGoodsListInEdit" bind:editGoodsNum="editGoodsNum" bind:editGoodsColorSize="editGoodsColorSize" bind:removeGoods="removeGoods" bind:goodsItemTouched="touchStartAction" bind:navToDetailPage="navToDetailPage"></cart-item>
<cart-item data-key="{{item.indexKey}}" goods="{{item}}" index="{{index}}" isEditing="{{isEditing}}" isEditSelectAll="{{isEditSelectAll}}" isInvalid="{{isInvalid}}" bind:chooseGoodsItem="chooseGoodsItem" bind:removeGoodsListInEdit="removeGoodsListInEdit" bind:editGoodsNum="editGoodsNum" bind:editGoodsColorSize="editGoodsColorSize" bind:removeGoods="removeGoods" bind:goodsItemTouched="touchStartAction" bind:navToDetailPage="navToDetailPage"></cart-item>
</block>
</block>
</template>
... ...