当前位置:网站首页>防止重复点击
防止重复点击
2022-07-29 01:32:00 【一只小炸毛】
防止重复点击
防止重复点击
import Vue from 'vue'
const noReClick = Vue.directive('noReClick', {
inserted: function (el, binding) {
el.addEventListener('click', () => {
if (!el.disabled) {
el.disabled = true
setTimeout(() => {
el.disabled = false
}, binding.value || 1000)
}
})
}
});
export {
noReClick }
main.js
import noReClick from './XXX/noReClick ' // 防多次点击,重复提交
使用
<el-button v-noReClick >确定</el-button>
边栏推荐
- h5背景音乐通过触摸自动播放
- How to find the right agent type? Multi angle analysis for you!
- “蔚来杯“2022牛客暑期多校训练营2,签到题GJK
- MySQL stores JSON format data
- mobile-picker.js
- 【云原生与5G】微服务加持5G核心网
- In 2022, the official data of programming language ranking came, which was an eye opener
- 为什么 BI 软件都搞不定关联分析
- Ignore wechat font settings
- What is a proxy server? [2022 guide]
猜你喜欢

【ONE·Data || 数组堆简单实现及其延伸】

Have you ever encountered the situation that the IP is blocked when crawling web pages?

基于 ICA 与 DL 的语音信号盲分离

第十五天(VLAN相关知识)

awvs无法启动问题

Establish an engineering template based on STM32 in keil -- detailed steps

druid. io kill -9 index_ Realtime traceability task

Semiconductor chip industry chain

Basic working principle and LTSpice simulation of 6T SRAM

Mathematical modeling -- red wine quality classification
随机推荐
JS dom2 and dom3
控制输入框弹出弹窗 和不弹出窗口
Navigation--实现Fragment之间数据传递和数据共享
Leetcode/ and continuous shortest subarray greater than or equal to target
使用本地缓存+全局缓存实现小型系统用户权限管理
MySQL stores JSON format data
MySQL安装常见报错处理大全
Web crawler API Quick Start Guide
2022.7.28-----leetcode.1331
MotionLayout--在可视化编辑器中实现动画
Control the pop-up window and no pop-up window of the input box
What is the function of data parsing?
How to crawl web pages with playwright?
How to find the right agent type? Multi angle analysis for you!
[cloud native] what is the microservice architecture
什么是作用域和作用域链
Force deduction brush question (2): sum of three numbers
Type analysis of demultiplexer (demultiplexer)
【云原生与5G】微服务加持5G核心网
Lxml web page capture the most complete strategy