I have a table that I get the userList as props and render it into the table with v-for="(user , index) in userList" :key="index" and as string :value="user.username" but now my swagger API needs me to patch it as an object of s.th like username:{value: "", operand: 1}
does anyone know how am I supposed to change the data type and send it as formData to my axios patch?
my axios.patch was also like this before i find out I need an object to pass :')
async userEdit(id) {
const response = await this.$store.dispatch('axiosPatch', {url: `/employees/${id}`,
formData: {
username: this.username.value,
email: this.email,
mobile: this.mobile,
}
}, this.$data)
},
my input form is also like this:
<input type="text" class="text-xs text-secondary mb-0 text-center
border-0 bg-white w-100 p-1"
:disabled="!user.disabled"
:value="user.nationalCode">