Merge pull request 'fix: 提成设置可以输入两位小数' (#11) from feature/mall_product into master
Reviewed-on: http://117.33.142.185:3000/zenghuapei/cyywl_server/pulls/11pull/12/head
commit
1aca869225
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue