|
|
@ -187,6 +187,13 @@ const rules = reactive({ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查整数位数 |
|
|
|
const integerPart = value.split('.')[0]; |
|
|
|
if (integerPart.length > 6) { |
|
|
|
callback(new Error('整数位数不能超过6位')); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查小数位数 |
|
|
|
if (value.includes('.')) { |
|
|
|
const decimalPart = value.split('.')[1]; |
|
|
@ -218,6 +225,13 @@ const rules = reactive({ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查整数位数 |
|
|
|
const integerPart = value.split('.')[0]; |
|
|
|
if (integerPart.length > 6) { |
|
|
|
callback(new Error('整数位数不能超过6位')); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查小数位数 |
|
|
|
if (value.includes('.')) { |
|
|
|
const decimalPart = value.split('.')[1]; |
|
|
@ -255,6 +269,13 @@ const rules = reactive({ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查整数位数 |
|
|
|
const integerPart = value.split('.')[0]; |
|
|
|
if (integerPart.length > 6) { |
|
|
|
callback(new Error('整数位数不能超过6位')); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查小数位数 |
|
|
|
if (value.includes('.')) { |
|
|
|
const decimalPart = value.split('.')[1]; |
|
|
|