diff --git a/package.json b/package.json index 857b13a..5690126 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cool-admin-vue", - "version": "3.1.6", + "version": "3.1.7", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", diff --git a/src/cool/modules/chat/components/chat.vue b/src/cool/modules/chat/components/chat.vue index fcd95eb..5df6733 100644 --- a/src/cool/modules/chat/components/chat.vue +++ b/src/cool/modules/chat/components/chat.vue @@ -15,11 +15,17 @@ :controls="['slot-session', 'cl-flex1', 'fullscreen', 'close']" >
+ -
+
+ - + +
diff --git a/src/cool/modules/chat/components/message.vue b/src/cool/modules/chat/components/message.vue index f489cff..e3bfa51 100644 --- a/src/cool/modules/chat/components/message.vue +++ b/src/cool/modules/chat/components/message.vue @@ -194,19 +194,22 @@ export default { } }, + beforeCreate() { + // 销毁事件 + eventBus.$off("message.refresh"); + eventBus.$off("message.scrollToBottom"); + }, + created() { // 监听列表刷新 eventBus.$on("message.refresh", this.refresh); // 滚动到底部 eventBus.$on("message.scrollToBottom", this.scrollToBottom); - - if (this.session) { - this.refresh(); - } }, destroyed() { + // 清除播放 clearTimeout(this.voice.timer); this.messageList.map(e => { diff --git a/src/cool/modules/chat/components/session.vue b/src/cool/modules/chat/components/session.vue index 2e2181a..15ce57c 100644 --- a/src/cool/modules/chat/components/session.vue +++ b/src/cool/modules/chat/components/session.vue @@ -89,6 +89,11 @@ export default { } }, + beforeCreate() { + // 销毁事件 + eventBus.$off("session.refresh"); + }, + created() { // 监听列表刷新 eventBus.$on("session.refresh", this.refresh); diff --git a/src/cool/modules/demo/views/demo.vue b/src/cool/modules/demo/views/demo.vue index 6dd5d60..1c4ab23 100644 --- a/src/cool/modules/demo/views/demo.vue +++ b/src/cool/modules/demo/views/demo.vue @@ -1,20 +1,11 @@