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] =?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 @@ -