mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-13 11:34:02 +08:00
Select: Fix memory leak issue (#16463)
This commit is contained in:
@@ -153,6 +153,10 @@
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
let index = this.select.cachedOptions.indexOf(this);
|
||||
if (index > -1) {
|
||||
this.select.cachedOptions.splice(index, 1);
|
||||
}
|
||||
this.select.onOptionDestroy(this.select.options.indexOf(this));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user