From 7e4c6bb68a013d098fc9217fc6bec531a721d6fd Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Fri, 28 Jun 2024 09:59:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?gitignore=E5=BF=BD=E7=95=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 78a752d..de3a38e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ selenium-debug.log package-lock.json yarn.lock +.gitignore +.history +.vscode/settings.json From 4763c3c569cfb7fd9df3abf89ee64b6f71698f49 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Fri, 28 Jun 2024 16:37:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/validate.js | 9 + src/views/system/role/index.vue | 2 +- src/views/system/user/index.vue | 327 ++++++++++++-------------------- 3 files changed, 136 insertions(+), 202 deletions(-) diff --git a/src/utils/validate.js b/src/utils/validate.js index 57a568e..00f4339 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -78,3 +78,12 @@ export function isArray(arg) { } return Array.isArray(arg) } +/** + * 密码的正则表达式 最少8个字符,最多20个字符,至少一个字母,一个数字和一个特殊字符: + * @param {string} password + * @returns {Boolean} + */ +export function validPwd(value) { + const reg = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,20}$/ + return reg.test(value) +} \ No newline at end of file diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index fb3b5ef..57aabf3 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -119,7 +119,7 @@ -