diff --git a/src/pages/Index/components/Setting/EnterPinModal.vue b/src/pages/Index/components/Setting/EnterPinModal.vue index 6f87da4..d74995a 100644 --- a/src/pages/Index/components/Setting/EnterPinModal.vue +++ b/src/pages/Index/components/Setting/EnterPinModal.vue @@ -8,7 +8,7 @@ @@ -75,7 +75,7 @@ const handleKeyboardInput = (value: string) => { // 更新当前输入值 currentInputValue.value = value // 更新对应字段的值 - pin.value = value + pin.value = value.slice(0, 4) } // 处理键盘按键 diff --git a/src/pages/Index/components/Setting/UpdatePinModal.vue b/src/pages/Index/components/Setting/UpdatePinModal.vue index 642d8b5..dff2e74 100644 --- a/src/pages/Index/components/Setting/UpdatePinModal.vue +++ b/src/pages/Index/components/Setting/UpdatePinModal.vue @@ -10,6 +10,7 @@
{ // 更新对应字段的值 if (currentInputField.value === 'oldpasswd') { - oldpasswd.value = value + oldpasswd.value = value.slice(0, 4) } else if (currentInputField.value == 'password') { - password.value = value + password.value = value.slice(0, 4) } else if (currentInputField.value == 'confirmPassword') { - confirmPassword.value = value + confirmPassword.value = value.slice(0, 4) } }