Migrate to nuxt settings page AND remove axios (#266)
* Settings pages migration * remove axios and use opnFetch * Make created form reactive (#267) * Remove verify pages and axios lib --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
4
client/composables/lib/vForm/Form.js
vendored
4
client/composables/lib/vForm/Form.js
vendored
@@ -77,7 +77,7 @@ class Form {
|
||||
Object.keys(this)
|
||||
.filter(key => !Form.ignore.includes(key))
|
||||
.forEach((key) => {
|
||||
this[key] = deepCopy(this.originalData[key]);
|
||||
this[key] = JSON.parse(JSON.stringify(this.originalData[key]));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ class Form {
|
||||
resolve(data);
|
||||
}).catch((error) => {
|
||||
this.handleErrors(error);
|
||||
resolve(error)
|
||||
reject(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
2
client/composables/useForm.js
vendored
2
client/composables/useForm.js
vendored
@@ -1,5 +1,5 @@
|
||||
import Form from "~/composables/lib/vForm/Form.js"
|
||||
|
||||
export const useForm = (formData = {}) => {
|
||||
return new Form(formData)
|
||||
return reactive(new Form(formData))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user