data(){
return:{
num:0,//点击次数
timer:'',//第一次点击的时间
timer6:'',//第六次点击的时间
centerDialogVisible: false
}
}
// 连续6次点击显示弹框
changeAccount(){
this.num++
if(this.num==1){
this.timer=new Date().getTime()/1000
}
if(this.num==6){
this.timer6= new Date().getTime()/1000
if(this.timer6-this.timer<=5){
this.num=0
this.centerDialogVisible=true
}else {
this.num=0
}
}
}
vue实现页面多次点击出现一个弹框事件
最新推荐文章于 2024-07-25 14:45:39 发布