fix: captcha ref not defined
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, computed, defineProps } from 'vue';
|
||||
import { ref, computed, defineProps, useTemplateRef } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { uploadAvatar } from '../../lib/api';
|
||||
import CAPTCHA from '../CAPTCHA.vue';
|
||||
@@ -17,6 +17,8 @@ const router = useRouter();
|
||||
|
||||
const avatarFile = ref(null);
|
||||
const avatarError = ref('');
|
||||
|
||||
const captcha = useTemplateRef('captcha');
|
||||
const captchaResponse = ref(null);
|
||||
|
||||
const onFileChange = (event) => {
|
||||
@@ -101,6 +103,7 @@ const avatarUrl = computed(() => {
|
||||
</div>
|
||||
</div>
|
||||
<CAPTCHA
|
||||
ref="captcha"
|
||||
:hcaptchaSitekey="$hcaptchaSitekey"
|
||||
:recaptchaSitekey="$recaptchaSitekey"
|
||||
:turnstileSitekey="$turnstileSitekey"
|
||||
|
||||
Reference in New Issue
Block a user