feat: add reactivity to formkit
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
:actions="false"
|
||||
@submit="onFormSubmit"
|
||||
>
|
||||
<FormKitSchema :schema="checkoutFormSchema"/>
|
||||
<FormKitSchema :schema="checkoutFormSchema" :data="data"/>
|
||||
</FormKit>
|
||||
</div>
|
||||
|
||||
@@ -76,6 +76,9 @@ const btnText = computed(() => {
|
||||
return checkout.isLoading ? 'Подождите...' : 'Создать заказ';
|
||||
});
|
||||
|
||||
import { reactive } from 'vue';
|
||||
const data = reactive(checkout.form);
|
||||
|
||||
function onCreateBtnClick() {
|
||||
try {
|
||||
submitForm('form-checkout');
|
||||
|
||||
Reference in New Issue
Block a user