diff --git a/src/components/Board/BoardForm.vue b/src/components/Board/BoardForm.vue
index 13d40a3..cdc77ad 100644
--- a/src/components/Board/BoardForm.vue
+++ b/src/components/Board/BoardForm.vue
@@ -9,6 +9,8 @@ const text = ref('');
const hcaptchaResponse = ref('');
const maxLength = 200;
+const hcaptchaRef = ref(null);
+
const handleHcaptchaVerify = (token) => {
hcaptchaResponse.value = token;
};
@@ -28,6 +30,7 @@ function submit() {
emit('new-message', { text: text.value, hcaptchaResponse: hcaptchaResponse.value });
text.value = '';
+ hcaptchaRef.value.reset();
}
@@ -50,9 +53,11 @@ function submit() {
diff --git a/src/components/Login/LoginForm.vue b/src/components/Login/LoginForm.vue
index 8fb70dd..6fced95 100644
--- a/src/components/Login/LoginForm.vue
+++ b/src/components/Login/LoginForm.vue
@@ -8,6 +8,8 @@ const username = ref('');
const password = ref('');
const hcaptchaResponse = ref('');
+const hcaptchaRef = ref(null);
+
const usernameError = ref('');
const passwordError = ref('');
@@ -62,6 +64,7 @@ const submit = () => {
}
emit('login-submit', { username: username.value, password: password.value, hcaptchaResponse: hcaptchaResponse.value });
+ hcaptchaRef.value.reset();
}
@@ -90,9 +93,11 @@ const submit = () => {
diff --git a/src/components/Register/RegisterForm.vue b/src/components/Register/RegisterForm.vue
index e469ec1..951e0cc 100644
--- a/src/components/Register/RegisterForm.vue
+++ b/src/components/Register/RegisterForm.vue
@@ -1,5 +1,5 @@
@@ -92,9 +95,11 @@ const submit = () => {
diff --git a/src/views/DailyMottoView.vue b/src/views/DailyMottoView.vue
index 71986c1..404ff18 100644
--- a/src/views/DailyMottoView.vue
+++ b/src/views/DailyMottoView.vue
@@ -10,6 +10,8 @@ const hcaptchaResponse = ref('');
const authStore = useAuthStore();
+const hcaptchaRef = ref(null);
+
const handleHcaptchaVerify = (token) => {
hcaptchaResponse.value = token;
};
@@ -24,6 +26,7 @@ const generateMotto = async () => {
try {
const generatedMotto = await generateMottoApi(authStore.jwt, hcaptchaResponse.value);
motto.value = generatedMotto;
+ hcaptchaRef.value.reset();
} catch (error) {
console.error(error);
alert('Failed to generate motto.');
@@ -39,9 +42,11 @@ const generateMotto = async () => {
Powered By Cloudflare Workers AI
每日金句: