no message

This commit is contained in:
kuaifan 2023-08-09 11:42:48 +08:00
parent 3971c63dda
commit ee708d1d1b
2 changed files with 23 additions and 12 deletions

View File

@ -10,11 +10,16 @@
placement="top-end" placement="top-end"
popperClass="chat-quick-emoji-popover"> popperClass="chat-quick-emoji-popover">
<div slot="reference"></div> <div slot="reference"></div>
<ul ref="emojiWrapper" class="chat-quick-emoji-wrapper scrollbar-hidden"> <Scrollbar
tag="ul"
ref="emojiWrapper"
:enable-x="true"
:enable-y="false"
class-name="chat-quick-emoji-wrapper scrollbar-hidden">
<li v-for="item in emojiQuickItems" @click="onEmojiQuick(item)"> <li v-for="item in emojiQuickItems" @click="onEmojiQuick(item)">
<img :title="item.name" :alt="item.name" :src="item.src"/> <img :title="item.name" :alt="item.name" :src="item.src"/>
</li> </li>
</ul> </Scrollbar>
</EPopover> </EPopover>
</div> </div>
@ -297,6 +302,8 @@ export default {
pasteClean: true, pasteClean: true,
changeLoad: 0,
isSpecVersion: this.checkIOSVersion(), isSpecVersion: this.checkIOSVersion(),
emojiTimer: null, emojiTimer: null,
@ -718,8 +725,10 @@ export default {
// Update model if text changes // Update model if text changes
this.quill.on('text-change', _ => { this.quill.on('text-change', _ => {
this.changeLoad++
this.textTimer && clearTimeout(this.textTimer) this.textTimer && clearTimeout(this.textTimer)
this.textTimer = setTimeout(_ => { this.textTimer = setTimeout(_ => {
this.changeLoad--
if (this.maxlength > 0 && this.quill.getLength() > this.maxlength) { if (this.maxlength > 0 && this.quill.getLength() > this.maxlength) {
this.quill.deleteText(this.maxlength, this.quill.getLength()); this.quill.deleteText(this.maxlength, this.quill.getLength());
} }
@ -917,7 +926,7 @@ export default {
} }
}); });
if (this.emojiQuickItems.length > 0) { 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.$nextTick(_ => {
this.emojiQuickShow = true this.emojiQuickShow = true
this.$refs.emojiQuickRef.updatePopper() this.$refs.emojiQuickRef.updatePopper()
@ -1035,14 +1044,16 @@ export default {
}, },
onSend(type) { onSend(type) {
this.hidePopover('send') setTimeout(_ => {
this.rangeIndex = 0 this.hidePopover('send')
this.clearSearchKey() this.rangeIndex = 0
if (type) { this.clearSearchKey()
this.$emit('on-send', null, type) if (type) {
} else { this.$emit('on-send', null, type)
this.$emit('on-send') } else {
} this.$emit('on-send')
}
}, this.changeLoad > 0 ? 100 : 0)
}, },
startRecord() { startRecord() {

View File

@ -16,7 +16,7 @@
{"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定 给你个眼神", "path": "9.gif"}, {"name": "给你个眼神", "key": "眼神 真的 质疑 疑问 不确定 给你个眼神", "path": "9.gif"},
{"name": "恭喜发财", "key": "恭喜发财 新年好 新年 拜年", "path": "10.gif"}, {"name": "恭喜发财", "key": "恭喜发财 新年好 新年 拜年", "path": "10.gif"},
{"name": "跪谢", "key": "谢谢 感动 跪 多谢 THANKS THANK YOU 谢了", "path": "11.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": "13.gif"},
{"name": "加油", "key": "加油 喝彩 气氛组", "path": "14.gif"}, {"name": "加油", "key": "加油 喝彩 气氛组", "path": "14.gif"},
{"name": "静静看着你", "key": "静静 看着 不说话 沉默 静静看着你 无语 看你表演", "path": "15.gif"}, {"name": "静静看着你", "key": "静静 看着 不说话 沉默 静静看着你 无语 看你表演", "path": "15.gif"},