perf: 优化编辑器对象销毁的问题

This commit is contained in:
kuaifan 2022-11-15 20:26:31 +08:00
parent 4e8053470d
commit a0174cdedd

View File

@ -154,13 +154,22 @@
this.content = this.value;
this.init();
},
beforeDestroy() {
if (this.editor !== null) {
this.editor.destroy()
this.editor = null
}
this.spinShow = true;
$A(this.$refs.myTextarea).show();
},
activated() {
this.content = this.value;
this.init();
},
deactivated() {
if (this.editor !== null) {
this.editor.destroy();
this.editor.destroy()
this.editor = null
}
this.spinShow = true;
$A(this.$refs.myTextarea).show();