Formatting
This commit is contained in:
parent
eb4172517b
commit
06ea746f38
@ -20,15 +20,15 @@ export default {
|
|||||||
optional: Boolean,
|
optional: Boolean,
|
||||||
nullOption: {
|
nullOption: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
created: function() {
|
created: function() {
|
||||||
emitEvent('field-mount', this, {
|
emitEvent('field-mount', this, {
|
||||||
optional: this.optional,
|
optional: this.optional,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
valid: this._isValid(this.value)
|
valid: this._isValid(this.value),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -52,12 +52,12 @@ export default {
|
|||||||
value: e.target.value,
|
value: e.target.value,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
watch: this.watch,
|
watch: this.watch,
|
||||||
valid: this._isValid(e.target.value)
|
valid: this._isValid(e.target.value),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
_isValid: function(value) {
|
_isValid: function(value) {
|
||||||
return this.optional || value !== this.nullOption
|
return this.optional || value !== this.nullOption
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ export default {
|
|||||||
emitEvent('field-mount', this, {
|
emitEvent('field-mount', this, {
|
||||||
optional: this.optional,
|
optional: this.optional,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
valid: this._isValid(this.value)
|
valid: this._isValid(this.value),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -150,6 +150,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return valid
|
return valid
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user