首页 > 其他分享 >Element input 正则验证 数字包含正负数 小数点 只包含一个小数点 一个 '-'

Element input 正则验证 数字包含正负数 小数点 只包含一个小数点 一个 '-'

时间:2022-09-07 11:37:19浏览次数:78  
标签:包含 小数点 Element 正负数 正则 input

<el-input placeholder v-model="scope.row[index]" oninput="value=value.replace(/[^\-?\d.]/g,'').replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace('-','$#$').replace(/\-/g,'').replace('$#$','-')"></el-input>

  
转自于:https://www.cnblogs.com/qfcddl/p/13389566.html

标签:包含,小数点,Element,正负数,正则,input
From: https://www.cnblogs.com/Ao-min/p/16664743.html

相关文章