mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-29 18:57:36 +08:00
Cascader: optimize performance (#21231)
This commit is contained in:
parent
6fda9a0821
commit
72be8f536f
@ -413,6 +413,7 @@ export default {
|
||||
handleDropdownLeave() {
|
||||
this.filtering = false;
|
||||
this.inputValue = this.presentText;
|
||||
this.doDestroy();
|
||||
},
|
||||
handleKeyDown(event) {
|
||||
switch (event.keyCode) {
|
||||
@ -643,7 +644,9 @@ export default {
|
||||
const offsetHeight = Math.round(tags.getBoundingClientRect().height);
|
||||
const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px';
|
||||
inputInner.style.height = height;
|
||||
this.updatePopper();
|
||||
if (this.dropDownVisible) {
|
||||
this.updatePopper();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user