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