diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 2aa9a08f..4a10bf2a 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -209,7 +209,7 @@ - + @@ -233,12 +233,12 @@ - + - + @@ -437,7 +437,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: [ { @@ -589,7 +590,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 d52137dc..621a1a3a 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 @@