From 2d2f3e9fdc2cb90638d7171919bebcfecc82381e Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Fri, 21 Apr 2023 10:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E7=BE=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/display/newChat/chatContent.vue | 8 ++++++++ src/views/newMap/display/newChat/chatDialog.vue | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/display/newChat/chatContent.vue b/src/views/newMap/display/newChat/chatContent.vue index 03409c772..e7867f5ff 100644 --- a/src/views/newMap/display/newChat/chatContent.vue +++ b/src/views/newMap/display/newChat/chatContent.vue @@ -95,11 +95,19 @@ export default { }, trainingSwitch() { return this.$store.state.trainingNew.trainingSwitch; + }, + lastMessage() { + return this.messageList[this.messageList.length - 1]; } }, watch: { '$store.state.training.domConfig': function(val) { this.trainingDesign = val.trainingDesign; + }, + lastMessage(newVal, oldVal) { + if (newVal.id != oldVal.id) { + this.scrollTop(); + } } }, mounted() { diff --git a/src/views/newMap/display/newChat/chatDialog.vue b/src/views/newMap/display/newChat/chatDialog.vue index 8edffd14c..0bdf5f338 100644 --- a/src/views/newMap/display/newChat/chatDialog.vue +++ b/src/views/newMap/display/newChat/chatDialog.vue @@ -40,7 +40,7 @@