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', {
|
this.$root.$emit('field-change', {
|
||||||
value: e.target.checked,
|
value: e.target.checked,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
|
parent_uid: this.$parent._uid,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -135,7 +135,11 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
_emitChange: function(name, value, valid) {
|
_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', {
|
this.$root.$emit('field-change', {
|
||||||
value: e.target.value,
|
value: e.target.value,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
|
parent_uid: this.$parent._uid,
|
||||||
})
|
})
|
||||||
this.showError = false
|
this.showError = false
|
||||||
this.showValid = true
|
this.showValid = true
|
||||||
|
@ -24,6 +24,7 @@ export default {
|
|||||||
this.$root.$emit('field-change', {
|
this.$root.$emit('field-change', {
|
||||||
value: e.target.value,
|
value: e.target.value,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
|
parent_uid: this.$parent._uid,
|
||||||
})
|
})
|
||||||
this.showError = false
|
this.showError = false
|
||||||
this.showValid = true
|
this.showValid = true
|
||||||
|
@ -128,6 +128,7 @@ export default {
|
|||||||
value: this._rawValue(value),
|
value: this._rawValue(value),
|
||||||
valid,
|
valid,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
|
parent_uid: this.$parent._uid,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -10,8 +10,10 @@ export default {
|
|||||||
const { value, name } = event
|
const { value, name } = event
|
||||||
if (typeof this[name] !== undefined) {
|
if (typeof this[name] !== undefined) {
|
||||||
this[name] = value
|
this[name] = value
|
||||||
|
if (event['parent_uid'] === this._uid) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user