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> </Field>
<div> <div>
<Field name="amount"> <Field v-slot="{ value, handleChange }" name="amount">
<template #default="{ field }"> <ui-input-label
<ui-input-label :model-value="value"
v-bind="field" :label="t('withdraw.amount')"
:label="t('withdraw.amount')" :placeholder="t('withdraw.enterAmountMax', { amount: maxAmount })"
:placeholder="t('withdraw.enterAmountMax', { amount: maxAmount })" type="number"
type="number" inputmode="numeric"
inputmode="numeric" @ion-input="(e: any) => handleChange(e.target.value)"
/> />
</template>
</Field> </Field>
<ErrorMessage name="amount" class="text-red-500 text-xs mt-1" /> <ErrorMessage name="amount" class="text-red-500 text-xs mt-1" />
</div> </div>