fix: captcha ref not defined
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { ref, watch, computed, useTemplateRef } from 'vue';
|
||||
import CAPTCHA from '../CAPTCHA.vue';
|
||||
|
||||
const emit = defineEmits(['login-submit']);
|
||||
@@ -7,6 +7,7 @@ const emit = defineEmits(['login-submit']);
|
||||
const username = ref('');
|
||||
const password = ref('');
|
||||
|
||||
const captcha = useTemplateRef('captcha');
|
||||
const captchaResponse = ref(null);
|
||||
const captchaVerified = computed(() => {
|
||||
return captchaResponse.value !== null;
|
||||
@@ -91,6 +92,7 @@ const submit = () => {
|
||||
</div>
|
||||
</div>
|
||||
<CAPTCHA
|
||||
ref="captcha"
|
||||
:hcaptchaSitekey="$hcaptchaSitekey"
|
||||
:recaptchaSitekey="$recaptchaSitekey"
|
||||
:turnstileSitekey="$turnstileSitekey"
|
||||
|
||||
Reference in New Issue
Block a user