el-input 金额校验

  <el-input
                        v-model="pitem.cheapPayMoney"
                        :placeholder="`最大输入金额为${pitem.maxcheapPayMoney}元`"
                        class="table-input"
                        type="number"
                        step="0.01"
                        onkeyup="if(isNaN(value)||value<0){value =''}if(value.indexOf('.')<0){value=parseFloat(value)}if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)}"
                        :oninput="`if(value>${pitem.maxcheapPayMoney})value=${pitem.maxcheapPayMoney}`"
                        :disabled="cheapdisabled"
                        @input="cheapPrice"
                      />

 

posted @ 2022-01-17 16:31  柠檬青味  阅读(811)  评论(0编辑  收藏  举报