Select: Fix memory leak issue (#16463)

pull/16687/head
Zhi Cun 2019-07-22 14:16:13 +08:00 committed by hetech
parent adabeff9ed
commit 418ac5bf79
1 changed files with 4 additions and 0 deletions

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