This commit is contained in:
梁灏 2019-10-15 11:28:23 +08:00
parent 62211805cb
commit 57a5f1f1cb

View file

@ -237,8 +237,9 @@
this.inputLength = this.$refs.input.value.length * 12 + 20; this.inputLength = this.$refs.input.value.length * 12 + 20;
this.$emit('on-keydown'); this.$emit('on-keydown');
}, },
handleInputDelete () { handleInputDelete (e) {
if (this.multiple && this.selectedMultiple.length && this.query === '') { const targetValue = e.target.value;
if (this.multiple && this.selectedMultiple.length && this.query === '' && targetValue === '') {
this.removeTag(this.selectedMultiple[this.selectedMultiple.length - 1]); this.removeTag(this.selectedMultiple[this.selectedMultiple.length - 1]);
} }
}, },