vue-plugin-helper-decorator
Version:
A bundle of decorator for using vue plugin
13 lines • 420 B
JavaScript
import { createDecorator } from 'vue-class-component';
/**
* Vulidate helper
* Reflect the method to component validations option
* https://github.com/monterail/vuelidate
*/
export function Validation() {
return createDecorator(function (componentOptions, handler) {
const options = componentOptions;
options.validations = options.methods[handler];
});
}
//# sourceMappingURL=vuelidate.js.map