<form @submit.prevent='onSubmit'>
<input type="text" name="user">
<input type="password" name="password">
<button type='submit'>Отправить</button>
</form>
async onSubmit($event) {
const fd = new FormData($event.target);
const response = await this.$axios.post('api/form', fd);
}
data() {
return {
projects: []
}
}
async fetch() {
this.projects = await this.$axios.$get(URL_PROJECTS)
}
_links: [
create: 'api.ru/action-crate',
read: 'api.ru/action-read',
update: 'api.ru/action-update',
delete: 'api.ru/action-delete'
]