mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
particularly complete forum function, add point order export and user delete
This commit is contained in:
27
src/components/TurnstileVerify.vue
Normal file
27
src/components/TurnstileVerify.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
import { TURNSTILE_KEY } from '@/data/constants'
|
||||
import { onUnmounted, ref } from 'vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
import VueTurnstile from 'vue-turnstile'
|
||||
const turnstile = ref()
|
||||
|
||||
const token = defineModel<string>('token', {
|
||||
default: '',
|
||||
})
|
||||
onUnmounted(() => {
|
||||
turnstile.value?.remove()
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
reset,
|
||||
})
|
||||
|
||||
function reset() {
|
||||
turnstile.value?.reset()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VueTurnstile ref="turnstile" :site-key="TURNSTILE_KEY" v-model="token" theme="auto" style="text-align: center" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user