From ee708d1d1bb50d86c30e8d670fa6b4e4ea851c0b Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 9 Aug 2023 11:42:48 +0800 Subject: [PATCH] no message --- .../manage/components/ChatInput/index.vue | 33 ++++++++++++------- .../assets/statics/public/js/emoticon.all.js | 2 +- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 57e6153e9..bb6e42ecb 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -10,11 +10,16 @@ placement="top-end" popperClass="chat-quick-emoji-popover">
- + @@ -297,6 +302,8 @@ export default { pasteClean: true, + changeLoad: 0, + isSpecVersion: this.checkIOSVersion(), emojiTimer: null, @@ -718,8 +725,10 @@ export default { // Update model if text changes this.quill.on('text-change', _ => { + this.changeLoad++ this.textTimer && clearTimeout(this.textTimer) this.textTimer = setTimeout(_ => { + this.changeLoad-- if (this.maxlength > 0 && this.quill.getLength() > this.maxlength) { this.quill.deleteText(this.maxlength, this.quill.getLength()); } @@ -917,7 +926,7 @@ export default { } }); if (this.emojiQuickItems.length > 0) { - this.$refs.emojiWrapper.style.maxWidth = `${this.$refs.inputWrapper.clientWidth}px` + this.$refs.emojiWrapper.$el.style.maxWidth = `${Math.min(500, this.$refs.inputWrapper.clientWidth)}px` this.$nextTick(_ => { this.emojiQuickShow = true this.$refs.emojiQuickRef.updatePopper() @@ -1035,14 +1044,16 @@ export default { }, onSend(type) { - this.hidePopover('send') - this.rangeIndex = 0 - this.clearSearchKey() - if (type) { - this.$emit('on-send', null, type) - } else { - this.$emit('on-send') - } + setTimeout(_ => { + this.hidePopover('send') + this.rangeIndex = 0 + this.clearSearchKey() + if (type) { + this.$emit('on-send', null, type) + } else { + this.$emit('on-send') + } + }, this.changeLoad > 0 ? 100 : 0) }, startRecord() { diff --git a/resources/assets/statics/public/js/emoticon.all.js b/resources/assets/statics/public/js/emoticon.all.js index 2bba7b87b..d75a801a8 100644 --- a/resources/assets/statics/public/js/emoticon.all.js +++ b/resources/assets/statics/public/js/emoticon.all.js @@ -16,7 +16,7 @@ {"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定 给你个眼神", "path": "9.gif"}, {"name": "恭喜发财", "key": "恭喜发财 新年好 新年 拜年", "path": "10.gif"}, {"name": "跪谢", "key": "谢谢 感动 跪 多谢 THANKS THANK YOU 谢了", "path": "11.gif"}, - {"name": "Hi", "key": "Hi 打招呼 欢迎 招呼 你好 好 哈喽 哈啰 hello 大家好", "path": "12.gif"}, + {"name": "Hi", "key": "Hi 打招呼 欢迎 招呼 你好 哈喽 哈啰 hello 大家好", "path": "12.gif"}, {"name": "欢迎欢迎", "key": "欢迎 新人 兴奋 开心 庆祝 喝彩 气氛组", "path": "13.gif"}, {"name": "加油", "key": "加油 喝彩 气氛组", "path": "14.gif"}, {"name": "静静看着你", "key": "静静 看着 不说话 沉默 静静看着你 无语 看你表演", "path": "15.gif"},