fix: 提成设置可以输入两位小数 #11

Merged
tianyu merged 1 commits from feature/mall_product into master 2023-06-02 09:53:09 +08:00
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ export default {
callback(new Error('请输入值'));
return false
}
if (!/(^[0-9]\d*$)/.test(value)) {
callback(new Error('值只能为正整数'));
if (!/^([0-9]|[1-9]\d+)(\.\d{1,2})?$/.test(value)) {
callback(new Error('请输入有效数字,最多保留两位小数'));
return false
}
if (value < 0 || value > 100) {