From d5167b3e358e3d491d7d259e0ba2b205e1b4c9cb Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Fri, 2 Jun 2023 09:53:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8F=90=E6=88=90=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E8=BE=93=E5=85=A5=E4=B8=A4=E4=BD=8D=E5=B0=8F?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/views/system/tenant/commissionSetting.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-ui-admin/src/views/system/tenant/commissionSetting.vue b/yudao-ui-admin/src/views/system/tenant/commissionSetting.vue index 3a240543f..4ce012d62 100644 --- a/yudao-ui-admin/src/views/system/tenant/commissionSetting.vue +++ b/yudao-ui-admin/src/views/system/tenant/commissionSetting.vue @@ -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) { -- 2.40.1