From 7f5b781c9b476eb1c74dd637cbf9ee54bc71acfd Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期六, 08 三月 2025 11:16:59 +0800 Subject: [PATCH] 页面跳转更新 --- src/directives/clickOutside.ts | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/directives/clickOutside.ts b/src/directives/clickOutside.ts index f6f3051..9eedca4 100644 --- a/src/directives/clickOutside.ts +++ b/src/directives/clickOutside.ts @@ -1,5 +1,5 @@ -import { on } from '/@/utils/domUtils'; -import { isServer } from '/@/utils/is'; +import { on } from '@/utils/domUtils'; +import { isServer } from '@/utils/is'; import type { ComponentPublicInstance, DirectiveBinding, ObjectDirective } from 'vue'; type DocumentHandler = <T extends MouseEvent>(mouseup: T, mousedown: T) => void; @@ -17,10 +17,10 @@ let startClick: MouseEvent; if (!isServer) { - on(document, 'mousedown', (e: MouseEvent) => (startClick = e)); - on(document, 'mouseup', (e: MouseEvent) => { + on(document, 'mousedown', (e: Event) => (startClick = e as MouseEvent)); + on(document, 'mouseup', (e: Event) => { for (const { documentHandler } of nodeList.values()) { - documentHandler(e, startClick); + documentHandler(e as MouseEvent, startClick); } }); } -- Gitblit v1.9.3