From 8bc4df01bb0638f331b62e32b8993547d6636f14 Mon Sep 17 00:00:00 2001
From: zhenyuWang <13641039885@163.com>
Date: Tue, 28 Jun 2022 15:36:44 +0800
Subject: [PATCH] =?UTF-8?q?fix(navigator):=20=E8=BF=98=E5=8E=9Fnavigator?=
=?UTF-8?q?=20dom=20=E7=BB=93=E6=9E=84=E5=B9=B6=E4=BD=BFhover-class=20?=
=?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=BC=A0=E6=A0=87=E4=BA=8B=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../uni-components/src/helpers/useHover.ts | 1 +
.../src/vue/navigator/index.tsx | 25 ++++++++++---------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/packages/uni-components/src/helpers/useHover.ts b/packages/uni-components/src/helpers/useHover.ts
index d856fe57c..e53026485 100644
--- a/packages/uni-components/src/helpers/useHover.ts
+++ b/packages/uni-components/src/helpers/useHover.ts
@@ -49,6 +49,7 @@ export function useHover(props: UseHoverOptions) {
}
function onMousedown(evt: MouseEvent) {
+ evt.preventDefault()
handleHover(evt)
window.addEventListener('mouseup', handlePCHoverEnd)
}
diff --git a/packages/uni-components/src/vue/navigator/index.tsx b/packages/uni-components/src/vue/navigator/index.tsx
index 54def0e0d..4342376e6 100644
--- a/packages/uni-components/src/vue/navigator/index.tsx
+++ b/packages/uni-components/src/vue/navigator/index.tsx
@@ -27,18 +27,19 @@ export default /*#__PURE__*/ defineBuiltInComponent({
const hasHoverClass = props.hoverClass && props.hoverClass !== 'none'
return (
-
-
- {slots.default && slots.default()}
-
+
+
+ {slots.default && slots.default()}
+
+
)
}
},
--
GitLab