UNPKG

quasar-framework

Version:

Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase

30 lines (29 loc) 538 B
export default { inject: { field: { from: '__field', default: null } }, props: { noParentField: Boolean }, watch: { noParentField (val) { if (!this.field) { return } this.field[val ? '__registerInput' : '__unregisterInput'](this) } }, beforeMount () { if (!this.noParentField && this.field) { this.field.__registerInput(this) } }, beforeDestroy () { if (!this.noParentField && this.field) { this.field.__unregisterInput(this) } } }