JS can only enter the interest rate, to two decimal places

<el-form :model="ruleForm" :rules="rules" ref="ruleForm">

   <el-form-item prop="allPayeeMoney">

          <el-input type="number" step="0.01" v-model="ruleForm.allPayeeMoney" autocomplete="off"></el-input>

   </el-form-item>

<el-form>

 

data(){

return {

     ruleForm: {

             allPayeeMoney

     }

}

rules : {

      yeeMoney: [

             {Required: true, message: 'Please fill in the correct amount, rounded to two decimal places', pattern: /^\d{1,2}(\.\d{1,2})?$/}

       ]

},
 

Guess you like

Origin blog.csdn.net/weixin_41760500/article/details/90513929