From 2262fa83f5020a77384c78bc6ff87b1169d40682 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Thu, 12 Feb 2026 18:28:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8F=90=E7=8E=B0=E9=A1=B5=E9=9D=A2):=20?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=98=BF=E8=AF=AD=E7=B3=BB=E7=BB=9F=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=B0=86=E6=95=B0=E5=AD=97=E8=BD=AC=E4=B8=BA=E4=BA=86?= =?UTF-8?q?=E9=98=BF=E8=AF=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/RechargeAgency/index.vue | 16 +++++++++------- src/views/Wallet/CashOut/CashOut.vue | 2 -- src/views/Wallet/availableIncome.vue | 2 -- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/views/RechargeAgency/index.vue b/src/views/RechargeAgency/index.vue index 3f42ca3..7b5d7a2 100644 --- a/src/views/RechargeAgency/index.vue +++ b/src/views/RechargeAgency/index.vue @@ -198,9 +198,6 @@ > { // 防止输入小数点的函数 const preventDecimalInput = (event) => { + let value = event.target.value + // 移除小数点和其他非整数字符 - event.target.value = event.target.value.replace(/[^0-9]/g, '') + value = value.replace(/[^0-9]/g, '') // 确保最小值为1 - if (event.target.value === '' || parseInt(event.target.value) < 1) { - event.target.value = '' + if (value === '' || parseInt(value) < 1) { + value = '' } - rechargeAmount.value = event.target.value + // 更新输入框的值 + event.target.value = value + + rechargeAmount.value = parseFloat(value) || 0 } // 键盘按下事件,阻止某些按键 diff --git a/src/views/Wallet/CashOut/CashOut.vue b/src/views/Wallet/CashOut/CashOut.vue index 1269bc5..1d722ca 100644 --- a/src/views/Wallet/CashOut/CashOut.vue +++ b/src/views/Wallet/CashOut/CashOut.vue @@ -301,8 +301,6 @@