测试数字输入框

This commit is contained in:
‘huanghaiixia’
2026-03-02 15:19:12 +08:00
parent 26f4969c45
commit 9aba50620a

View File

@ -76,7 +76,7 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="相对方数量" name="cpCount"> <a-form-item label="相对方数量" name="cpCount">
<a-input-number v-model:value="formState.cpCount" style="width: 100%" disabled :precision="0" /> <input-number v-model:value="formState.cpCount" style="width: 100%" disabled :precision="0" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -90,14 +90,8 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="合同金额(万元)" name="amount"> <a-form-item label="合同金额(万元)" name="amount">
<a-input-number v-model:value="formState.amount" style="width: 100%" <input-number v-model:value="formState.amount" style="width: 100%"
:formatter="value => { @blur="amountBlur(formState.amount)" :min="8" :disabled="isDisable" />
const [int, dec] = `${value}`.split('.');
const intStr = int.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return dec ? ` ${intStr}.${dec}` : ` ${intStr}`;
}"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
@blur="amountBlur(formState.amount)" :min="0" :disabled="isDisable" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">