@aspectus/vee-control-descriptor
Version:
Control descriptor integrated with vee validate provider. Special wrapper for control element that adds additional description.
30 lines (27 loc) • 620 B
JavaScript
/* eslint-disable prefer-object-spread */
export default {
render(h) {
const context = {
attrs: Object.assign({ value: this.value }, this.$attrs),
on: Object.assign({}, this.$listeners, {
input: this.input, blur: this.blur,
}),
scopedSlots: this.$scopedSlots,
};
return h(this.gatedHandlerComponent, context, null);
},
methods: {
input(e) {
this.$emit('input', e);
},
blur(e) {
this.$emit('blur', e);
},
},
inheritAttrs: false,
props: {
gatedHandlerComponent: {},
value: {},
},
name: 'vee-validate-input-handler-gate',
};