当前位置:网站首页>Multiple clicks of the button result in results
Multiple clicks of the button result in results
2022-06-25 11:37:00 【Your beauty fascinates me】
// Prevent processing multiple clicks
function noMultipleClicks(methods, info) {
// methods It is a function that needs to be executed after clicking , info Is to click the parameter to be transmitted
let that = this;
if(!that.noClick){
that.noClick=true;
setTimeout(()=>{
that.noClick=false;
},5000)
if(info && info !== '') {
// info Is the parameter that needs to be passed to execute the function
methods(info);
} else {
methods();
}
} else{
uni.showToast({
title:" Click frequency too fast ,5s Try again later ",
icon:"none",
duration:500
})
}
}
// export
export default {
noMultipleClicks,// Multiple clicks are prohibited
}
stay main.js Use
// Configure public methods
import common from './common/noMultipleClicks.js'
Vue.prototype.$noMultipleClicks = common.noMultipleClicks;
Actual combat application :
Print view :
边栏推荐
- Detailed explanation of Spark's support source code for Yan priority
- Database Series: MySQL index optimization summary (comprehensive version)
- GC
- Spark history server and event log details
- Whole process of web page request
- Double buffer transparent encryption and decryption driven course paper + project source code based on minifilter framework
- Spark runs wordcount (case 1)
- relu与sigmod的比较
- GaussDB 集群维护案例集-sql执行慢
- Apache ShenYu 入门
猜你喜欢

SQL injection vulnerability (type chapter)

杭州/北京内推 | 阿里达摩院招聘视觉生成方向学术实习生(人才计划)

CFCA安心签接入

牛客网:主持人调度

redis的dict的扩容机制(rehash)

How to start the phpstudy server

Introduction to JVM principle

Compilation of learning from Wang Shuang (1)

What are the ways to simulate and burn programs? (including common tools and usage)

仿真与烧录程序有哪几种方式?(包含常用工具与使用方式)
随机推荐
建造者模式
What are the functions of arm64 assembly that need attention?
try-catch-finally
子类A继承父类B, A a = new A(); 则父类B构造函数、父类B静态代码块、父类B非静态代码块、子类A构造函数、子类A静态代码块、子类A非静态代码块 执行的先后顺序是?
Big endian and little endian
CMU提出NLP新范式—重构预训练,高考英语交出134高分
redis的dict的扩容机制(rehash)
JVM 原理简介
牛客网:分糖果问题
relu与sigmod的比较
Very important very important very important very important very important very important very important very important very important
Spark history server performance improvement (I) -- Application List
Detection and analysis of simulator in an app
Xishan technology rushes to the scientific innovation board: it plans to raise 660million yuan. Guoyijun and his wife have 60% of the voting rights
某APP中模拟器检测分析
What are the ways to simulate and burn programs? (including common tools and usage)
Arrays.asList()
Builder pattern
A difficult mathematical problem baffles two mathematicians
Tidb applicable scenarios