LePatron.email
LePatron.email copied to clipboard
Improve Form components
We would like to improve our form components to have a better development experience and to optimize the code.
I think we could do some research for those things :
- [ ] Create a "sub"
v-text-field
component for example which take a prop to remove the following lines :
@input="$v.scope.field.$touch()"
@blur=$v.scope.field.$touch()"
- [ ] Create a mixin to put some code inside it and to remove this code in components. For example :
-
requiredErrors
method -
isValidForm
, a new method to remove the following lines inonSubmit
methods :
this.$v.$touch();
if (this.$v.$invalid) return;