diff --git a/src/views/profile/personalCenter/index.vue b/src/views/profile/personalCenter/index.vue index fb08bfd..20e5aa6 100644 --- a/src/views/profile/personalCenter/index.vue +++ b/src/views/profile/personalCenter/index.vue @@ -356,6 +356,35 @@ const updateSendState = () => { sendState.value = { isCounting: t.isCounting.value, countdown: t.countdown.value }; }; +// 监听 editField 变化,实时更新 sendState +watch( + () => editField.value, + () => { + nextTick(() => { + updateSendState(); + }); + } +); + +// 监听倒计时状态变化,实时同步到 sendState +watch( + () => phoneCaptchaState.countdown.value, + () => { + if (editField.value === 'mobile') { + updateSendState(); + } + } +); + +watch( + () => emailCaptchaState.countdown.value, + () => { + if (editField.value === 'email') { + updateSendState(); + } + } +); + // 语言切换 const handleLanguageChange = async (val: number) => { try {