限制发放红包数量
parent
1d412a7d13
commit
d6be388db0
@ -1,9 +1,11 @@
|
|||||||
import hasRole from './permission/hasRole'
|
import hasRole from './permission/hasRole'
|
||||||
import hasPermi from './permission/hasPermi'
|
import hasPermi from './permission/hasPermi'
|
||||||
import copyText from './common/copyText'
|
import copyText from './common/copyText'
|
||||||
|
import preReClick from './preRe/preReClick'
|
||||||
|
|
||||||
export default function directive(app){
|
export default function directive(app){
|
||||||
app.directive('hasRole', hasRole)
|
app.directive('hasRole', hasRole)
|
||||||
app.directive('hasPermi', hasPermi)
|
app.directive('hasPermi', hasPermi)
|
||||||
app.directive('copyText', copyText)
|
app.directive('copyText', copyText)
|
||||||
|
app.directive('preReClick', preReClick)
|
||||||
}
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
export default {
|
||||||
|
mounted(el, binding) {
|
||||||
|
el.addEventListener('click', () => {
|
||||||
|
if (!el.disabled) {
|
||||||
|
el.disabled = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
el.disabled = false;
|
||||||
|
}, binding.value || 2000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue