From 3a7ec7c3905aa9d1b0d403865bf13bbee738ae75 Mon Sep 17 00:00:00 2001 From: orenzhang Date: Thu, 11 Jul 2024 15:41:34 +0800 Subject: [PATCH] feat: mobile touch event --- src/components/MessageDisplay.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/MessageDisplay.vue b/src/components/MessageDisplay.vue index abba294..1d1e5fd 100644 --- a/src/components/MessageDisplay.vue +++ b/src/components/MessageDisplay.vue @@ -55,12 +55,16 @@ onMounted(() => { el.addEventListener('wheel', () => { emits('toggleUserBehavior', true); }); + el.addEventListener('touchmove', () => { + emits('toggleUserBehavior', true); + }); } }); onUnmounted(() => { const el = document.getElementById('chat-display'); if (el) { el.removeEventListener('wheel', () => {}); + el.removeEventListener('touchmove', () => {}); } });