fix: 更新金额输入字段的绑定方式,使用v-slot以支持双向数据绑定

This commit is contained in:
2026-01-15 02:07:56 +07:00
parent ed24f0b9de
commit 2bd8593f09

View File

@@ -212,16 +212,15 @@ async function onSubmit(values: GenericObject) {
</Field>
<div>
<Field name="amount">
<template #default="{ field }">
<ui-input-label
v-bind="field"
:label="t('withdraw.amount')"
:placeholder="t('withdraw.enterAmountMax', { amount: maxAmount })"
type="number"
inputmode="numeric"
/>
</template>
<Field v-slot="{ value, handleChange }" name="amount">
<ui-input-label
:model-value="value"
:label="t('withdraw.amount')"
:placeholder="t('withdraw.enterAmountMax', { amount: maxAmount })"
type="number"
inputmode="numeric"
@ion-input="(e: any) => handleChange(e.target.value)"
/>
</Field>
<ErrorMessage name="amount" class="text-red-500 text-xs mt-1" />
</div>