feat(提现页面): 处理阿语系统手机将数字转为了阿语的问题
This commit is contained in:
parent
3d21f5e870
commit
2262fa83f5
@ -198,9 +198,6 @@
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
v-model="rechargeAmount"
|
v-model="rechargeAmount"
|
||||||
type="number"
|
|
||||||
min="1"
|
|
||||||
step="1"
|
|
||||||
:placeholder="t('enter_recharge_amount')"
|
:placeholder="t('enter_recharge_amount')"
|
||||||
class="amount-input"
|
class="amount-input"
|
||||||
@input="preventDecimalInput"
|
@input="preventDecimalInput"
|
||||||
@ -445,15 +442,20 @@ const Confirm = () => {
|
|||||||
|
|
||||||
// 防止输入小数点的函数
|
// 防止输入小数点的函数
|
||||||
const preventDecimalInput = (event) => {
|
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
|
// 确保最小值为1
|
||||||
if (event.target.value === '' || parseInt(event.target.value) < 1) {
|
if (value === '' || parseInt(value) < 1) {
|
||||||
event.target.value = ''
|
value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
rechargeAmount.value = event.target.value
|
// 更新输入框的值
|
||||||
|
event.target.value = value
|
||||||
|
|
||||||
|
rechargeAmount.value = parseFloat(value) || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// 键盘按下事件,阻止某些按键
|
// 键盘按下事件,阻止某些按键
|
||||||
|
|||||||
@ -301,8 +301,6 @@
|
|||||||
<!-- 输入提现金额 -->
|
<!-- 输入提现金额 -->
|
||||||
<div style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px">
|
<div style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px">
|
||||||
<input
|
<input
|
||||||
type="number"
|
|
||||||
min="50"
|
|
||||||
name=""
|
name=""
|
||||||
id=""
|
id=""
|
||||||
:placeholder="t('enter_cash_out_amount')"
|
:placeholder="t('enter_cash_out_amount')"
|
||||||
|
|||||||
@ -653,8 +653,6 @@
|
|||||||
<!-- 输入提现金额 -->
|
<!-- 输入提现金额 -->
|
||||||
<div style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px">
|
<div style="box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 12px">
|
||||||
<input
|
<input
|
||||||
type="number"
|
|
||||||
min="50"
|
|
||||||
name=""
|
name=""
|
||||||
id=""
|
id=""
|
||||||
:placeholder="t('enter_cash_out_amount')"
|
:placeholder="t('enter_cash_out_amount')"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user