...
|
...
|
@@ -119,7 +119,7 @@ Component({ |
|
|
touchStartAction(e) {
|
|
|
this._touchStart = false;
|
|
|
|
|
|
if(this.data.isEditing || e.target.id === 'del-btn'){
|
|
|
if (this.data.isEditing || e.target.id === 'del-btn') {
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -134,11 +134,10 @@ Component({ |
|
|
this._touchStart = e.changedTouches[0];
|
|
|
},
|
|
|
touchEndAction(e) {
|
|
|
if(this.data.isEditing || !this._touchStart){
|
|
|
if (this.data.isEditing || !this._touchStart) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
let isShowDelete = this.data.isShowDelete;
|
|
|
let touchEnd = e.changedTouches[0];
|
|
|
|
|
|
let offsetX = this._touchStart.clientX - touchEnd.clientX;
|
...
|
...
|
@@ -147,7 +146,7 @@ Component({ |
|
|
let show = false;
|
|
|
|
|
|
if (offsetX > this.data.slideWidth * 0.3) {
|
|
|
show = !show
|
|
|
show = !show;
|
|
|
}
|
|
|
|
|
|
this.toggleAnimation(show);
|
...
|
...
|
@@ -174,7 +173,12 @@ Component({ |
|
|
|
|
|
this.setData({item});
|
|
|
},
|
|
|
removeItemAction(e) {
|
|
|
navToDetailAction() {
|
|
|
if (!this.data.isEditing) {
|
|
|
this.triggerEvent('navToDetailPage', this.data.item);
|
|
|
}
|
|
|
},
|
|
|
removeItemAction() {
|
|
|
this.triggerEvent('removeGoods', this.data.item);
|
|
|
},
|
|
|
editGoodsNum(e) {
|
...
|
...
|
|