mirror of https://github.com/ElemeFE/element
Select: Fix memory leak issue (#16463)
parent
adabeff9ed
commit
418ac5bf79
|
@ -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));
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue