@@ -1,7 +1,53 @@
|
||||
<script lang="ts">
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import type { FormSubmitEvent } from '@nuxt/ui';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hint: '',
|
||||
guesses: [],
|
||||
};
|
||||
},
|
||||
|
||||
mounted () {
|
||||
axios
|
||||
.get('/api/fetch_tla/en')
|
||||
.then(response => {
|
||||
this.hint = response.data.hint;
|
||||
this.guesses = response.data.guesses;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async function onSubmit(event: FormSubmitEvent<Schema>) {
|
||||
console.log(event.data)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
asdfsadfsadf
|
||||
</template>
|
||||
<UCard>
|
||||
<template #header>
|
||||
{{ this.hint }}
|
||||
</template>
|
||||
|
||||
<template v-for="guess in guesses">
|
||||
{{ guess }}
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<UForm :schema="schema" :state="state" class="space-y-4" @submit="onSubmit">
|
||||
<UInput
|
||||
placeholder="Three Letter Abbreviation"
|
||||
/>
|
||||
|
||||
<UButton type="submit">
|
||||
Submit
|
||||
</UButton>
|
||||
</UForm>
|
||||
|
||||
</template>
|
||||
</UCard>
|
||||
</template>
|
||||
Reference in New Issue
Block a user