diff --git a/packages/uni-components/src/helpers/useHover.ts b/packages/uni-components/src/helpers/useHover.ts
index e5302648521b2eada7f13da41bd086c1f3f5db9b..f4adf00e9b83b1b8d24f357bbec4a86c4c16f376 100644
--- a/packages/uni-components/src/helpers/useHover.ts
+++ b/packages/uni-components/src/helpers/useHover.ts
@@ -45,16 +45,19 @@ export function useHover(props: UseHoverOptions) {
if (evt.touches.length > 1) {
return
}
- handleHover(evt)
+ handleHoverStart(evt)
}
function onMousedown(evt: MouseEvent) {
- evt.preventDefault()
- handleHover(evt)
+ if (hoverTouch) {
+ return
+ }
+
+ handleHoverStart(evt)
window.addEventListener('mouseup', handlePCHoverEnd)
}
- function handleHover(evt: TouchEvent | MouseEvent) {
+ function handleHoverStart(evt: TouchEvent | MouseEvent) {
// TODO detect scrolling
if ((evt as any)._hoverPropagationStopped) {
return
@@ -80,6 +83,10 @@ export function useHover(props: UseHoverOptions) {
}
function onMouseup() {
+ if (!hoverTouch) {
+ return
+ }
+
handlePCHoverEnd()
}
diff --git a/packages/uni-components/src/vue/navigator/index.tsx b/packages/uni-components/src/vue/navigator/index.tsx
index 4342376e66cd5debb0de000ed6a8a3335e58487c..148684f441fc2d5fe75e2869d78fe69e787e3d01 100644
--- a/packages/uni-components/src/vue/navigator/index.tsx
+++ b/packages/uni-components/src/vue/navigator/index.tsx
@@ -27,7 +27,12 @@ export default /*#__PURE__*/ defineBuiltInComponent({
const hasHoverClass = props.hoverClass && props.hoverClass !== 'none'
return (
-
+