I am currently learning Vue and experimenting with form handling. I am developing a web application for managing meetings which includes a multi-step form to collect visitor and host data. However, upon clicking the submit button, I encounter the following error message:
TypeError: Object(...) is not a function
. Despite searching on stackoverflow, I haven't been able to find a clear solution.
Here is the snippet of my code:
scheduleMeeting.js
<template>
<el-container>
<el-row>
<el-col class="desc" :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<p>Your content here</p>
</el-col>
<!-- more HTML content here -->
<el-col class="form-div" :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<!-- Form elements and steps -->
</el-col>
</el-row>
</el-container>
</template>
<!-- Script section - method implementations -->
<!--<style lang="css"></style>-->
meeting.js
// Import necessary modules
export default {
scheduleMeeting(meeting) {
return session.post("/meeting/create/", {
...meeting
})
}
};
Below is the complete error log message:
Uncaught (in promise) TypeError: Object(...) is not a function
at eval (ScheduleMeeting.vue?34e8:184)
eval @ ScheduleMeeting.vue?34e8:184
Promise.then (async)
createMeeting$ @ ScheduleMeeting.vue?34e8:182
tryCatch @ vue-phone-number-inp…common.js?7bec:2629
invoke @ vue-phone-number-inp…common.js?7bec:2855
prototype.<computed> @ vue-phone-number-inp…common.js?7bec:2681
<!-- Error continuation details until the end -->
Any guidance or assistance regarding this error would be greatly appreciated!