From 4f7fd25b344fed5844813f0b084b0ffa8ebe7bcd Mon Sep 17 00:00:00 2001 From: nekosu Date: Tue, 5 Sep 2023 15:46:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4ipc=E4=B8=AD=E7=9A=84e?= =?UTF-8?q?vent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/renderer/src/hooks/events/ui.ts | 2 +- packages/types/ipc/utils.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/renderer/src/hooks/events/ui.ts b/packages/renderer/src/hooks/events/ui.ts index 093a270c..07627149 100644 --- a/packages/renderer/src/hooks/events/ui.ts +++ b/packages/renderer/src/hooks/events/ui.ts @@ -5,7 +5,7 @@ export default function useUiHooks(): void { window.renderer.WindowManager = { - showMessage({ message, options }, event) { + showMessage({ message, options }) { // ? 是否需要用string包裹防止xss // event.returnValue = window.$message.create(String(message), options) }, diff --git a/packages/types/ipc/utils.ts b/packages/types/ipc/utils.ts index d94bf45f..52679701 100644 --- a/packages/types/ipc/utils.ts +++ b/packages/types/ipc/utils.ts @@ -19,7 +19,7 @@ type CallerWrapper any> = ( ) => CleanVoid>>> type CalleeWrapper any, Event> = ( - ...args: [...args: Parameters, event: Event] + ...args: [...args: Parameters] ) => ReturnType export type CallerProxyObjectType< @@ -122,7 +122,7 @@ export function createCalleeProxy< set(_target2: Record, subk: string, func: (...args: any[]) => any) { const mapper = _target.$$mapper as Map const wfunc = (event: ExtEvent, ...args: any[]) => { - return func(...args, event) + return func(...args) } mapper.set(func, wfunc) add(`${scope}.${key}:${subk}`, wfunc) @@ -146,7 +146,7 @@ export function createCalleeProxy< const mapper = _target.$$mapper as Map const func = value[subk] const wfunc = (event: ExtEvent, ...args: any[]) => { - return func(...args, event) + return func(...args) } mapper.set(func, wfunc) add(`${scope}.${key}:${subk}`, wfunc)