From 273dc0f43f7a9139734af076ee30465abba6c523 Mon Sep 17 00:00:00 2001 From: simon3000 Date: Thu, 11 Jul 2019 21:50:28 +0200 Subject: [PATCH] =?UTF-8?q?=E7=AA=97=E5=8F=A3=E7=BC=A9=E6=94=BE=E6=97=B6?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ChatRenderer/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/ChatRenderer/index.vue b/frontend/src/components/ChatRenderer/index.vue index d6cd236..2897926 100644 --- a/frontend/src/components/ChatRenderer/index.vue +++ b/frontend/src/components/ChatRenderer/index.vue @@ -65,7 +65,11 @@ export default { this.styleElement.innerText = this.css this.scrollToBottom() }, + created() { + window.addEventListener('resize', this.scrollToBottom) + }, beforeDestroy() { + window.removeEventListener('resize', this.scrollToBottom) document.head.removeChild(this.styleElement) }, updated() {