当前位置:网站首页>防止重复点击
防止重复点击
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>
边栏推荐
- Semiconductor chip industry chain
- Force deduction brush question (1): sum of two numbers
- 试着换个角度理解低代码平台设计的本质
- Lm13 morphological quantification momentum period analysis
- Feynman learning method (symbol table)
- Force deduction brush question (2): sum of three numbers
- Blind separation of speech signals based on ICA and DL
- Introduction to shared data center agent
- Mysql存储json格式数据
- druid. io index_ Realtime real-time query
猜你喜欢

Wonderful use of data analysis

数学建模——带相变材料的低温防护服御寒仿真模拟

Mathematical modeling -- the laying of water pipes

(arxiv-2018) reexamine the time modeling of person Reid based on video

Complete collection of common error handling in MySQL installation

Mathematical modeling -- heat conduction of subgrade on Permafrost

druid. The performance of IO + tranquility real-time tasks is summarized with the help of 2020 double 11

iVX低代码平台系列详解 -- 概述篇(二)

(arxiv-2018) 重新审视基于视频的 Person ReID 的时间建模

MySQL high performance optimization notes (including 578 pages of notes PDF document), collected
随机推荐
mobile-picker.js
How to find the right agent type? Multi angle analysis for you!
Wonderful use of data analysis
Implementation of 10m multifunctional signal generator with FPGA
Qt源码分析--QObject(4)
leetcode/0和1个数相同的连续子数组
iVX低代码平台系列详解 -- 概述篇(二)
How companies make business decisions -- with the help of data-driven marketing
LM13丨形态量化-动量周期分析
autoware中ndtmatching功能加载点云图坐标系修正的问题
“蔚来杯“2022牛客暑期多校训练营3,签到题CAJHF
2022.7.27-----leetcode.592
(arxiv-2018) reexamine the time modeling of person Reid based on video
MySQL high performance optimization notes (including 578 pages of notes PDF document), collected
druid. IO custom real-time task scheduling policy
How to write, load and unload plug-ins in QT
第十五天(VLAN相关知识)
ciscn 2022 华中赛区 misc
The problem of modifying the coordinate system of point cloud image loaded by ndtmatching function in autoware
Ignore wechat font settings