I have a dynamic form who change with the route param this.$route.params.editor and everything work fine but the submit function does not call the API (the calling function is in a separate file) because also the function is dynamic and change with the params
There are the form code:
methods: {
save () {
const editor = this.$route.params.editor
this.$api[editor]().save(this.localData).then((res) => {
this.localData = res
}).catch(err => console.error(err))
}
}
The result must be like this:
this.$api.material().save(this.localData)
or
this.$api.item().save(this.localData)
But the function must be obviusly dynamic