Add emiter to all input fields
This commit is contained in:
parent
8b10732ac9
commit
02cc18a93f
@ -10,6 +10,7 @@ export default {
|
||||
this.$root.$emit('field-change', {
|
||||
value: e.target.checked,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -135,7 +135,11 @@ export default {
|
||||
|
||||
methods: {
|
||||
_emitChange: function(name, value, valid) {
|
||||
this.$root.$emit('field-change', { value, valid, name })
|
||||
this.$root.$emit('field-change', {
|
||||
value,
|
||||
name,
|
||||
parent_uid: this.$parent && this.$parent._uid,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -43,6 +43,7 @@ export default {
|
||||
this.$root.$emit('field-change', {
|
||||
value: e.target.value,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
this.showError = false
|
||||
this.showValid = true
|
||||
|
@ -24,6 +24,7 @@ export default {
|
||||
this.$root.$emit('field-change', {
|
||||
value: e.target.value,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
this.showError = false
|
||||
this.showValid = true
|
||||
|
@ -128,6 +128,7 @@ export default {
|
||||
value: this._rawValue(value),
|
||||
valid,
|
||||
name: this.name,
|
||||
parent_uid: this.$parent._uid,
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -10,7 +10,9 @@ export default {
|
||||
const { value, name } = event
|
||||
if (typeof this[name] !== undefined) {
|
||||
this[name] = value
|
||||
this.disabled = false
|
||||
if (event['parent_uid'] === this._uid) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user