From e18f547d48290d3d5ce84836f43010862c405f8b Mon Sep 17 00:00:00 2001 From: Tony Yang Date: Wed, 16 Apr 2025 18:44:27 +0800 Subject: [PATCH] update: reset captcha after new message --- src/components/Board/BoardForm.vue | 4 ++++ src/components/Login/LoginForm.vue | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Board/BoardForm.vue b/src/components/Board/BoardForm.vue index 4cf30dc..8b55936 100644 --- a/src/components/Board/BoardForm.vue +++ b/src/components/Board/BoardForm.vue @@ -6,6 +6,8 @@ const emit = defineEmits(['new-message']); const props = defineProps(['locked']); const text = ref(''); + +const captcha = ref(null); const captchaResponse = ref(null); const captchaVerified = computed(() => { return captchaResponse.value !== null; @@ -26,6 +28,7 @@ function submit() { } emit('new-message', { text: text.value, captchaResponse: captchaResponse.value }); + captcha.value.reset(); text.value = ''; } @@ -49,6 +52,7 @@ function submit() { { return captchaResponse.value !== null; }); @@ -62,6 +62,7 @@ const submit = () => { } emit('login-submit', { username: username.value, password: password.value, captchaResponse: captchaResponse.value }); + captcha.value.reset(); }