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 @@