fix: 将密码最小长度调整为 11 位

This commit is contained in:
shenlei
2026-07-20 15:11:02 +09:00
parent cf6cc1d21a
commit 8c0bce45a4
3 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -325,7 +325,7 @@
</div>
<div class="form-group">
<label>密码 *</label>
<input v-model="userForm.password" type="password" placeholder="至少 12 位">
<input v-model="userForm.password" type="password" placeholder="至少 11 位">
</div>
<div class="form-group">
<label class="checkbox-label">
@@ -349,7 +349,7 @@
</div>
<div class="form-group">
<label>新密码</label>
<input v-model="newPassword" type="password" placeholder="至少 12 位">
<input v-model="newPassword" type="password" placeholder="至少 11 位">
</div>
<div style="margin-top: 20px; display: flex; gap: 12px; justify-content: flex-end;">
<button class="action-btn" style="padding: 8px 16px;" @click="showPasswordModal = false">取消</button>
@@ -650,8 +650,8 @@ const createUser = async () => {
alert('请填写用户名和密码')
return
}
if (userForm.value.password.length < 12) {
alert('密码至少 12 位')
if (userForm.value.password.length < 11) {
alert('密码至少 11 位')
return
}
try {
@@ -678,8 +678,8 @@ const openPasswordModal = (u) => {
}
const changePassword = async () => {
if (!newPassword.value || newPassword.value.length < 12) {
alert('密码至少 12 位')
if (!newPassword.value || newPassword.value.length < 11) {
alert('密码至少 11 位')
return
}
try {