Commit 78c915a3 by wangzhihui

fixed

1 parent 46a4b572
......@@ -473,15 +473,15 @@ export default {
},
// 验证数字输入
validateNumber(item, field, maxLimit = 31) {
// console.log(item, field)
let value = item[field]
value = parseInt(value) || ""
value = isNaN(value) || ""
value = parseInt(value)
if (isNaN(value)) value = ""
// 限制最大值
if (parseInt(value) > maxLimit) {
value = ""
this.$message.warning(`输入值不能超过 ${maxLimit}`)
}
console.log(parseInt(value) < 0, "parseInt(value) < 0")
if (parseInt(value) < 0) {
value = ""
this.$message.warning(`输入值不能小于0`)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!