赞
踩
<el-input v-model.trim="form.invoice_price" clearable oninput="value=value.match(/\d+\.?\d{0,2}/,'')" @blur="form.invoice_price=JEblurFn(form.invoice_price)"/>
function JEblurFn(value){
return value=Number(value).toFixed(2)
}
<el-input v-model="form.phone" maxlength="20" oninput="value=value.replace(/[^0-9]/g,'')"></el-input>
<el-input v-model.trim="form.invoice_price" clearable oninput="value=value.match(/\d+\.?\d{0,2}/,'')"/>
<el-input v-model.trim="form.invoice_price" clearable oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。