@@ -19,7 +19,7 @@ The form object is a reactive object that contains the data of the form. You can
1919It has several special properties:
2020
2121- ` $reset() ` : a method that resets the form to its initial state.
22- - ` $save () ` : a method that saves the form and creates a new item.
22+ - ` $submit () ` : a method that saves the form and creates a new item.
2323- ` $loading ` : a boolean that indicates whether the form is being saved.
2424- ` $error ` : an error object that contains the error if the form could not be saved.
2525- ` $schema ` the validation schema for the form object (see [ schema validation] ( #schema-validation ) ).
@@ -39,7 +39,7 @@ createTodo.$onSaved(() => {
3939</script>
4040
4141<template>
42- <form @submit.prevent="createTodo.$save ()">
42+ <form @submit.prevent="createTodo.$submit ()">
4343 <!-- Input -->
4444 <input ref="input" v-model="createTodo.title">
4545 <!-- Submit -->
@@ -81,7 +81,7 @@ The update for object has the following special properties:
8181
8282- ` $reset() ` : a method that resets the form to its initial state.
8383
84- - ` $save () ` : a method that saves the form and updates the item.
84+ - ` $submit () ` : a method that saves the form and updates the item.
8585
8686- ` $loading ` : a boolean that indicates whether the form is being saved.
8787
@@ -116,7 +116,7 @@ updateTodo.$onSaved(() => emit('close'))
116116</script>
117117
118118<template>
119- <form @submit.prevent="updateTodo.$save ()">
119+ <form @submit.prevent="updateTodo.$submit ()">
120120 <!-- Input -->
121121 <input v-model="updateTodo.title">
122122 <!-- Submit -->
@@ -173,7 +173,7 @@ const createTodo = store.todos.createForm()
173173 <UForm
174174 :state="createTodo"
175175 :schema="createTodo.$schema"
176- @submit="createTodo.$save ()"
176+ @submit="createTodo.$submit ()"
177177 >
178178 <!-- UFormFields here -->
179179 </UForm>
0 commit comments