Select: Fix memory leak issue (#16463)

This commit is contained in:
Zhi Cun
2019-07-22 14:16:13 +08:00
committed by hetech
parent adabeff9ed
commit 418ac5bf79

View File

@@ -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));
}
};