1154079537 1f1392cc1d 修改
2024-05-11 16:55:28 +08:00

29 lines
463 B
JavaScript

const mixins = {
data() {
return {
wrapHeight: 'auto',
clientY: 0,
maxHeight: 0,
}
},
methods: {
// 移动
onTouchMove(e) {
console.log(e);
const moveDistance = e.changedTouches[0].clientY - this.clientY;
if (moveDistance > 5) {
this.wrapHeight = '352rpx';
} else {
this.wrapHeight = 0;
}
},
// 开始触摸屏幕
onTouchStart(e) {
this.clientY = e.changedTouches[0].clientY;
},
}
}
export default mixins;