|
|
|
@ -221,12 +221,13 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 触摸过程 |
|
|
|
|
drawMove(id, e) { |
|
|
|
|
console.log('过程',e.changedTouches[0]); |
|
|
|
|
console.log('过程',e.changedTouches); |
|
|
|
|
var endX = e.changedTouches[0].clientX; |
|
|
|
|
let diff = endX - this.clientX; |
|
|
|
|
console.log(diff); |
|
|
|
|
|
|
|
|
|
if (Math.abs(diff) <= 60 && diff < 0) { |
|
|
|
|
console.log(this.$refs.box_center); |
|
|
|
|
let box_center = this.$refs.box_center[id] |
|
|
|
|
// console.log(diff); |
|
|
|
|
box_center.$el.style.left = diff + 'px' |
|
|
|
@ -235,10 +236,9 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 结束触摸 |
|
|
|
|
drawEnd(id, e) { |
|
|
|
|
// console.log('结束',e.changedTouches[0]); |
|
|
|
|
console.log('结束',e.changedTouches[0]); |
|
|
|
|
var endX = e.changedTouches[0].clientX; |
|
|
|
|
let diff = endX - this.clientX; |
|
|
|
|
let box_center = this.$refs.box_center[id] |
|
|
|
|
if (Math.abs(diff) > 20) { |
|
|
|
|
// console.log('移动',diff,id,e); |
|
|
|
|
if (diff < 0) { |
|
|
|
@ -255,6 +255,7 @@ export default { |
|
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
|
this.page = 1; |
|
|
|
|
this.loadend = false; |
|
|
|
|
this.activeHeaderMask = -1; |
|
|
|
|
this.getGradeList(); |
|
|
|
|
}); |
|
|
|
|
} else if (this.active === 2) { |
|
|
|
@ -266,6 +267,7 @@ export default { |
|
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
|
this.page = 1; |
|
|
|
|
this.loadend = false; |
|
|
|
|
this.activeHeaderMask = -1; |
|
|
|
|
this.getGradeList(); |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
@ -275,6 +277,7 @@ export default { |
|
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
|
this.page = 1; |
|
|
|
|
this.loadend = false; |
|
|
|
|
this.activeHeaderMask = -1; |
|
|
|
|
this.getGradeList(); |
|
|
|
|
}) |
|
|
|
|
.catch((err) => { |
|
|
|
|