perf: 滑动快捷表情选择

This commit is contained in:
Pang 2024-04-17 07:46:43 +08:00
parent cc125cc292
commit 3c93ad18b2
2 changed files with 8 additions and 0 deletions

View File

@ -28,6 +28,10 @@ export default {
type: Number,
default: 20
},
touchContentBlur: {
type: Boolean,
default: true
},
},
data() {
return {
@ -248,6 +252,9 @@ export default {
* @param e
*/
onContentTouchStart(e) {
if (!this.touchContentBlur) {
return;
}
const focusedElement = document.activeElement;
if (focusedElement) {
focusedElement.blur();

View File

@ -15,6 +15,7 @@
ref="emojiWrapper"
:enable-x="true"
:enable-y="false"
:touch-content-blur="false"
class-name="chat-quick-emoji-wrapper scrollbar-hidden">
<li v-for="item in emojiQuickItems" @click="onEmojiQuick(item)">
<img :title="item.name" :alt="item.name" :src="item.src"/>