From e6f36da1841d7e793b2c412f52bb12cd7767727f Mon Sep 17 00:00:00 2001 From: carry <2641257231@qq.com> Date: Thu, 20 Feb 2025 17:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E7=AC=A6=E5=90=88=E8=A6=81=E6=B1=82=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditUserDialog.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/EditUserDialog.vue b/src/components/EditUserDialog.vue index b4ea57a..bda5bdb 100644 --- a/src/components/EditUserDialog.vue +++ b/src/components/EditUserDialog.vue @@ -82,6 +82,9 @@ const handleConfirm = async () => { if (!createData.password) { throw new Error('密码不能为空') } + if (!/^\d{6,}$/.test(createData.password)) { + throw new Error('密码必须为6位或以上的数字') + } await userService.createUser({ username: createData.username, password: createData.password,