mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
remove errorMessage when prompt is closed
This commit is contained in:
committed by
cinwell.li
parent
3d18463415
commit
4ac3118687
@@ -140,19 +140,23 @@
|
||||
},
|
||||
|
||||
watch: {
|
||||
inputValue() {
|
||||
if (this.$type === 'prompt') {
|
||||
inputValue(val) {
|
||||
if (this.$type === 'prompt' && val !== null) {
|
||||
this.validate();
|
||||
}
|
||||
},
|
||||
|
||||
value(val) {
|
||||
if (val && this.$type === 'prompt') {
|
||||
if (this.$type !== 'prompt') return;
|
||||
if (val) {
|
||||
setTimeout(() => {
|
||||
if (this.$refs.input && this.$refs.input.$el) {
|
||||
this.$refs.input.$el.querySelector('input').focus();
|
||||
}
|
||||
}, 500);
|
||||
} else {
|
||||
this.editorErrorMessage = '';
|
||||
removeClass(this.$refs.input.$el.querySelector('input'), 'invalid');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user