提交 45bb712e 编写于 作者: 且把清酒's avatar 且把清酒

feat: 新增按钮防抖指令

上级 545a34de
export { hasPerm, hasRole } from './permission';
export { deBounce } from './utils';
import { Directive, DirectiveBinding } from 'vue';
/**
* 按钮防抖
*/
export const deBounce:Directive = {
mounted(el:HTMLElement) {
el.addEventListener('click', e => {
el.classList.add('is-disabled')
setTimeout(() => {
el.classList.remove('is-disabled')
}, 2000)
})
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册