fixed #1865
This commit is contained in:
parent
8c4cc38379
commit
e1b86bcf73
3 changed files with 102 additions and 17 deletions
|
@ -63,10 +63,14 @@
|
|||
queryChange (val) {
|
||||
const parsedQuery = val.replace(/(\^|\(|\)|\[|\]|\$|\*|\+|\.|\?|\\|\{|\}|\|)/g, '\\$1');
|
||||
this.hidden = !new RegExp(parsedQuery, 'i').test(this.searchLabel);
|
||||
},
|
||||
// 在使用函数防抖后,设置 key 后,不更新组件了,导致SearchLabel 不更新 #1865
|
||||
updateSearchLabel () {
|
||||
this.searchLabel = this.$el.innerHTML;
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.searchLabel = this.$el.innerHTML;
|
||||
this.updateSearchLabel();
|
||||
this.dispatch('iSelect', 'append');
|
||||
this.$on('on-select-close', () => {
|
||||
this.isFocus = false;
|
||||
|
|
|
@ -627,6 +627,7 @@
|
|||
this.$nextTick(() => this.broadcastQuery(''));
|
||||
} else {
|
||||
this.findChild((child) => {
|
||||
child.updateSearchLabel(); // #1865
|
||||
child.selected = this.multiple ? this.model.indexOf(child.value) > -1 : this.model === child.value;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue