当前位置:网站首页>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 :
边栏推荐
- Query method and interrupt method to realize USART communication
- 金仓KFS数据集中场景(多对一)部署
- 如何实现移动端富文本编辑器功能
- JVM 原理简介
- Detailed explanation of Spark's support source code for Yan priority
- redis的dict的扩容机制(rehash)
- CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
- [maintain cluster case set] gaussdb query user space usage
- A difficult mathematical problem baffles two mathematicians
- Upload and modify the use of avatars
猜你喜欢
redis的dict的扩容机制(rehash)
CFCA Anxin sign access
查询法,中断法实现USART通信
Compilation of learning from Wang Shuang (1)
Idea uses the fast request interface for debugging
What are the ways to simulate and burn programs? (including common tools and usage)
SystemVerilog (XIII) - enumerate data types
時創能源沖刺科創板:擬募資11億 年營收7億淨利反降36%
基于Minifilter框架的双缓冲透明加解密驱动 课程论文+项目源码
An interesting logic SRC mining
随机推荐
GaussDB 如何统计用户sql的响应时间
数据库系列:MySQL索引优化总结(综合版)
RPC typical framework
Vulnérabilité à l'injection SQL (contournement)
Jincang database kingbasees plug-in identity_ pwdexp
Apache ShenYu 入门
基于Minifilter框架的双缓冲透明加解密驱动 课程论文+项目源码
子类A继承父类B, A a = new A(); 则父类B构造函数、父类B静态代码块、父类B非静态代码块、子类A构造函数、子类A静态代码块、子类A非静态代码块 执行的先后顺序是?
Presto Web UI introduction
4 life distributions
時創能源沖刺科創板:擬募資11億 年營收7億淨利反降36%
Gaussdb others scenarios with high memory
Comparable的使用(用于Arrays.sort)
Niuke.com: host scheduling
CFCA Anxin sign access
反应c语言程序结构特点的程序
Spannable 和 Editable、SpannableString 和 SpannableString
2022 PMP project management examination agile knowledge points (2)
ThingsPanel 发布物联网手机客户端(多图)
What are the functions of arm64 assembly that need attention?