uniapp双击单击事件

uniapp本身是没有双击单击事件的

但是我们可以自己来创建这个方法、

get_sj(e){
	this.touchNum ++
	setTimeout(()=>{
		if(this.touchNum == 1){
			console.log('单击')
		}
		if(this.touchNum >= 2){
			console.log('双击')
		}
		this.touchNum = 0
	},250)
},


评论