输入等于0时不让其保留两位小数

This commit is contained in:
郑庆 2025-10-22 21:47:34 +08:00
parent 4304287f3e
commit 0f1843cde5

View File

@ -158,7 +158,13 @@
<template #header><span class="hl-table_header">*</span>预估单价</template>
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.unitPrice`" class="mb-0px!" >
<el-input-number v-model="row.unitPrice" type="number" :precision="2" @change="changeUnitPrice(row)" />
<el-input
v-model="row.unitPrice"
type="number"
placeholder="两位小数"
@change="changeUnitPrice(row)"
/>
</el-form-item>
</template>
</el-table-column>
@ -166,7 +172,11 @@
<template #header><span class="hl-table_header">*</span>预估总价</template>
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.estimatedPrices`" class="mb-0px!" >
<el-input-number v-model="row.estimatedPrices" type="number" :precision="2" @change="changeEstimatedPrices(row)"
<el-input
v-model="row.estimatedPrices"
type="number"
@change="changeEstimatedPrices(row)"
placeholder="两位小数"
/>
</el-form-item>
</template>