wms-pda迁移
This commit is contained in:
16
static/js/directive.js
Normal file
16
static/js/directive.js
Normal file
@@ -0,0 +1,16 @@
|
||||
export default {
|
||||
//自定义节流操作
|
||||
preventReClick: {
|
||||
mounted(el, binding) {
|
||||
el.addEventListener('click', () => {
|
||||
if (!el.disabled) {
|
||||
el.disabled = true
|
||||
setTimeout(() => {
|
||||
el.disabled = false
|
||||
}, binding.value || 2000) //2000ms间隔时间
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user