diff --git a/src/components/AmountInputBox/AmountInputBox.js b/src/components/AmountInputBox/AmountInputBox.js index 3332bd83..59e1e978 100644 --- a/src/components/AmountInputBox/AmountInputBox.js +++ b/src/components/AmountInputBox/AmountInputBox.js @@ -39,7 +39,12 @@ const checkFloat = (e, reg, charcode, el) => { } } } - +const loading = (e, el, bind) => { + el.disabled = true + setTimeout(function() { + el.disabled = false + }, 5000) +} /** * @author LeeYunxiang * @description 限制数字输入格式 int => 正整数 , num => 自然数(正整数包括0) , float => 正数包括小数(建议用text类型的input表单) @@ -75,6 +80,13 @@ export default { break } }) + el.addEventListener('click', e => { + switch (bind.value) { + case 'loading': + loading(e, el, bind) + break + } + }) } } }