update method name

This commit is contained in:
2023-07-27 22:22:46 +10:00
parent 728472b897
commit 6ecf807081
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
<template>
<form :id="id" @submit.prevent="handleSubmit">
<form :id="id" @submit.prevent="submit">
<slot></slot>
</form>
</template>
@@ -36,7 +36,7 @@ watch(
/**
* Handle the user submitting the form.
*/
const handleSubmit = async function () {
const submit = async function () {
inputs = Array.from(document.querySelectorAll(`#${id} input`));
for (let i = inputs.length - 1; i >= 0; i--) {
@@ -71,5 +71,5 @@ const enableFormInputs = () => {
};
provide(props.formId, props.modelValue);
defineExpose({ handleSubmit });
defineExpose({ submit });
</script>

View File

@@ -96,7 +96,7 @@ onMounted(() => {
}
// handleSubmit();
formObject.value.handleSubmit();
formObject.value.submit();
}
});
</script>