|
@@ -57,6 +57,9 @@
|
|
|
@keydown.enter.prevent="selectOption"
|
|
|
@keydown.esc.stop.prevent="visible = false"
|
|
|
@keydown.delete="deletePrevTag"
|
|
|
+ @compositionstart="handleComposition"
|
|
|
+ @compositionupdate="handleComposition"
|
|
|
+ @compositionend="handleComposition"
|
|
|
v-model="query"
|
|
|
@input="e => handleQueryChange(e.target.value)"
|
|
|
:debounce="remote ? 300 : 0"
|
|
@@ -304,7 +307,8 @@
|
|
|
query: '',
|
|
|
previousQuery: null,
|
|
|
inputHovering: false,
|
|
|
- currentPlaceholder: ''
|
|
|
+ currentPlaceholder: '',
|
|
|
+ isOnComposition: false
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -407,8 +411,16 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ handleComposition(event) {
|
|
|
+ if (event.type === 'compositionend') {
|
|
|
+ this.isOnComposition = false;
|
|
|
+ this.handleQueryChange(event.target.value);
|
|
|
+ } else {
|
|
|
+ this.isOnComposition = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
handleQueryChange(val) {
|
|
|
- if (this.previousQuery === val) return;
|
|
|
+ if (this.previousQuery === val || this.isOnComposition) return;
|
|
|
if (
|
|
|
this.previousQuery === null &&
|
|
|
(typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')
|