当前位置:网站首页>Prevent repeated clicks
Prevent repeated clicks
2022-07-29 02:16:00 【A little fried hair】
Prevent repeated clicks
Prevent repeated clicks
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 ' // Prevent multiple clicks , Repeated submission
Use
<el-button v-noReClick > determine </el-button>
边栏推荐
- QT memory management tips
- 自定义mvc原理和框架实现
- What is a proxy server? [2022 guide]
- LM13丨形态量化-动量周期分析
- Basic working principle and LTSpice simulation of 6T SRAM
- Flexible layout single selection
- Using local cache + global cache to realize user rights management of small systems
- Idea connection database
- 【ONE·Data || 数组堆简单实现及其延伸】
- 2022.7.28-----leetcode.1331
猜你喜欢

Verilog procedure assignment statements: blocking & non blocking

Idea connection database

Control buzzer based on C51
[electronic components] zener diode

【RT学习笔记1】RT-Thread外设例程——控制Led灯闪烁

Ciscn 2022 central China Misc

Mathematical modeling -- heat conduction of subgrade on Permafrost
![[one · data | chained binary tree]](/img/83/d62a47f1264673f1e898335303a7a6.png)
[one · data | chained binary tree]

MotionLayout--在可视化编辑器中实现动画

druid. io index_ Realtime real-time query
随机推荐
[UE4] replay game playback for ue4.26
Navigation--实现Fragment之间数据传递和数据共享
Jetpack -- navigation realizes page Jump
druid. io index_ Realtime real-time query
H5 background music is played automatically by touch
2022.7.28-----leetcode.1331
Leetcode exercise - Sword finger offer 45. arrange the array into the smallest number
Mathematical modeling -- Optimization of picking in warehouse
Leetcode/0 and 1 consecutive subarrays with the same number
Leetcode/ and continuous shortest subarray greater than or equal to target
试着换个角度理解低代码平台设计的本质
Have you ever encountered the situation that the IP is blocked when crawling web pages?
Mysql存储json格式数据
leetcode/乘积小于K 的连续子数组的个数
QT source code analysis -- QObject (4)
Click back to the top JS
(arxiv-2018) reexamine the time modeling of person Reid based on video
(cvpr-2019) selective kernel network
Probability Density Reweight
Mathematical modeling -- heat conduction of subgrade on Permafrost