From a0174cdedd94aae835a758a253bce70c0e32693e Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 15 Nov 2022 20:26:31 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=AF=B9=E8=B1=A1=E9=94=80=E6=AF=81=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/TEditor.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/TEditor.vue b/resources/assets/js/components/TEditor.vue index 152c30463..cfd3bd5d7 100755 --- a/resources/assets/js/components/TEditor.vue +++ b/resources/assets/js/components/TEditor.vue @@ -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();