src/utils/stopReClick.js
@@ -21,4 +21,21 @@ }) } }) export { stopReClick } const longReClick = Vue.directive('longReClick', { inserted: function (el, binding) { el.addEventListener('click', () => { if (!el.disabled) { el.disabled = true el.style.cursor = 'not-allowed' setTimeout(() => { el.style.cursor = 'pointer' el.disabled = false //设置时间 }, binding.value || 30000) } }) } }) export { stopReClick, longReClick }