UNPKG

q42-cms-components

Version:

16 lines (15 loc) 417 B
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 } } }