|
@@ -143,6 +143,10 @@ export default {
|
|
|
close() {
|
|
close() {
|
|
|
this.moveX = 0;
|
|
this.moveX = 0;
|
|
|
this.status = false;
|
|
this.status = false;
|
|
|
|
|
+ // 添加微小的偏移量以强制更新(解决iOS上由于数据未变化导致视图不更新的问题)
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.moveX = 101;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
// 打开按钮的状态
|
|
// 打开按钮的状态
|
|
|
open() {
|
|
open() {
|
|
@@ -196,7 +200,9 @@ export default {
|
|
|
this.$emit('close', this.index);
|
|
this.$emit('close', this.index);
|
|
|
},
|
|
},
|
|
|
// 开始触摸
|
|
// 开始触摸
|
|
|
- touchstart() {},
|
|
|
|
|
|
|
+ touchstart() {
|
|
|
|
|
+ this.$emit('touchstart', this.index);
|
|
|
|
|
+ },
|
|
|
getActionRect() {
|
|
getActionRect() {
|
|
|
this.$uGetRect('.u-swipe-action').then(res => {
|
|
this.$uGetRect('.u-swipe-action').then(res => {
|
|
|
this.movableAreaWidth = res.width;
|
|
this.movableAreaWidth = res.width;
|
|
@@ -212,6 +218,9 @@ export default {
|
|
|
if (this.status == true) {
|
|
if (this.status == true) {
|
|
|
this.status = 'close';
|
|
this.status = 'close';
|
|
|
this.moveX = 0;
|
|
this.moveX = 0;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.moveX = 101;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
this.$emit('content-click', this.index);
|
|
this.$emit('content-click', this.index);
|
|
|
}
|
|
}
|