<a-input v-model:value="item2.val" onkeyup="if(!/^[0-9]+$/.test(value)) value=value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');if(value>100)value=100;if(value<0)value=null;if(value<0)value=null;if((value[0] == 0 && value[1] > 0) || value == '00')value=value.slice(1);if(/[^\d.]/g.test(value))value=null"placeholder="值" :maxlength="5" />
标签:英文字母,校验,value,输入框,100,小数 From: https://www.cnblogs.com/426jie/p/17122040.html