From 1ed60c79c0a76228b5034f5e4c8a905b27abef35 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 22 Jun 2021 20:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E6=A0=A1=E9=AA=8C=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/system/user/index.vue | 14 +++++++++----- .../src/views/system/user/profile/userInfo.vue | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index d16465ebf..b2c00eff6 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -210,7 +210,7 @@ - + @@ -234,12 +234,12 @@ - + - + @@ -440,7 +440,8 @@ export default { { required: true, message: "用户昵称不能为空", trigger: "blur" } ], password: [ - { required: true, message: "用户密码不能为空", trigger: "blur" } + { required: true, message: "用户密码不能为空", trigger: "blur" }, + { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' } ], email: [ { @@ -592,7 +593,10 @@ export default { handleResetPwd(row) { this.$prompt('请输入"' + row.userName + '"的新密码', "提示", { confirmButtonText: "确定", - cancelButtonText: "取消" + cancelButtonText: "取消", + closeOnClickModal: false, + inputPattern: /^.{5,20}$/, + inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", }).then(({ value }) => { resetUserPwd(row.userId, value).then(response => { this.msgSuccess("修改成功,新密码是:" + value); diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue index d52137dc8..621a1a3a9 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue @@ -1,7 +1,7 @@