The iview input box always prompts an error when checking the number type

First, add a number attribute to the Input box


<Input placeholder="请输入项目单价" number  v-model="dataObj.projectPrice"></Input>

Then in ruleValidate, add a type:'number' to the non-empty check

projectPrice: [
          { required: true, type: 'number', message: '请输入项目单价', trigger: 'blur' }
        ],

Guess you like

Origin blog.csdn.net/cainiao1412/article/details/109014137