q42-cms-components
Version:
Front-end package that provides a UI on top of the QMS back-end
16 lines (15 loc) • 417 B
JavaScript
export const ValidatorMixin = {
computed: {
validatorEventBus () {
let target = this
while (target && !target.eventBus) {
target = target.$parent
}
if (!target) {
console.warn('Should have eventBus on an ancestor, make sure your <validator>/<submit> is inside a validator-group-base');
return null;
}
return target.eventBus
}
}
}