fix: 更新金额输入字段的绑定方式,使用v-slot以支持双向数据绑定
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user