export default {
data() {
return {
touchStartTime: 0
}
},
methods: {
doubleClick() {
if (this.touchStartTime === 0) {
this.touchStartTime = new Date().getTime()
setTimeout(() => {
this.touchStartTime = 0
}, 300)
} else {
if (new Date().getTime() - this.touchStartTime <= 300) {
wx.showModal({
showCancel: false,
content: '你双击了'
})
}
this.touchStartTime = 0
}
}
}
}