From a2a761b4b8bb67d49f487a983cc280bdc259947d Mon Sep 17 00:00:00 2001 From: huaiyuan <1029848564@qq.com> Date: Mon, 9 Dec 2024 16:03:44 +0800 Subject: [PATCH] fix: Fix the bug of long press icon deformation on mobile devices --- .../src/pages/mobile/DockComponent.vue | 28 +++++++++++++++++-- .../frontend/src/pages/mobile/LaunchPad.vue | 14 +++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/packages/frontend/src/pages/mobile/DockComponent.vue b/packages/frontend/src/pages/mobile/DockComponent.vue index b82c1c8..7668082 100644 --- a/packages/frontend/src/pages/mobile/DockComponent.vue +++ b/packages/frontend/src/pages/mobile/DockComponent.vue @@ -9,16 +9,19 @@ :key="'aood+index' + index" >
- + > + +
+
+
{{ element.title }}
@@ -101,6 +104,25 @@ defineExpose({ width: 0.52rem; height: 0.52rem; border-radius: 0.14rem; + -webkit-touch-callout: none; + -webkit-user-select: none; + -webkit-user-drag: none; + overflow: hidden; + position: relative; + img { + width: 100%; + height: 100%; + } + .overlay { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: transparent; + } } .app-name { width: 100%; diff --git a/packages/frontend/src/pages/mobile/LaunchPad.vue b/packages/frontend/src/pages/mobile/LaunchPad.vue index 259854d..1b76f4b 100644 --- a/packages/frontend/src/pages/mobile/LaunchPad.vue +++ b/packages/frontend/src/pages/mobile/LaunchPad.vue @@ -31,6 +31,7 @@ -moz-user-select: none; -ms-user-select: none; user-select: none; + position: relative; " v-touch-hold:1200.mouse="handleHold" :id="appStore.desktopApps[element].id" @@ -68,11 +69,9 @@
{ grid-template-columns: repeat(4, 25%); grid-row-gap: 30px; padding-top: 60px; + .pad-img { + width: 58px; + height: 58px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -webkit-user-drag: none; + } .launchpadapps_name { width: 100%; text-align: center;