From 53668b12e929e13e5ffd945ed07c53ace05246d5 Mon Sep 17 00:00:00 2001 From: carry <2641257231@qq.com> Date: Thu, 20 Feb 2025 17:49:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/EditUserDialog.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/EditUserDialog.vue b/frontend/src/components/EditUserDialog.vue index b4ea57a..bda5bdb 100644 --- a/frontend/src/components/EditUserDialog.vue +++ b/frontend/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,