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