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 @@
-
+
{{ item.name }}
{{ getLastMsg(item.messageList) }}