data(){
return{
xianzhi:0
}
}
fun(){
let now = new Date().getTime(); //获取当前时间戳
if((now - this.xianzhi) < 2000){
console.log('点击频繁') //限制两秒内点击多次检测
return
}
// 请求体(事件) //
this.xianzhi = now
}
data(){
return{
xianzhi:0
}
}
fun(){
let now = new Date().getTime(); //获取当前时间戳
if((now - this.xianzhi) < 2000){
console.log('点击频繁') //限制两秒内点击多次检测
return
}
// 请求体(事件) //
this.xianzhi = now
}