Commit 72be8f53 authored by 好多大米's avatar 好多大米 Committed by GitHub

Cascader: optimize performance (#21231)

parent 6fda9a08
...@@ -413,6 +413,7 @@ export default { ...@@ -413,6 +413,7 @@ export default {
handleDropdownLeave() { handleDropdownLeave() {
this.filtering = false; this.filtering = false;
this.inputValue = this.presentText; this.inputValue = this.presentText;
this.doDestroy();
}, },
handleKeyDown(event) { handleKeyDown(event) {
switch (event.keyCode) { switch (event.keyCode) {
...@@ -643,8 +644,10 @@ export default { ...@@ -643,8 +644,10 @@ export default {
const offsetHeight = Math.round(tags.getBoundingClientRect().height); const offsetHeight = Math.round(tags.getBoundingClientRect().height);
const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px'; const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px';
inputInner.style.height = height; inputInner.style.height = height;
if (this.dropDownVisible) {
this.updatePopper(); this.updatePopper();
} }
}
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment