From 5ba2a73c7035d84688be0b0f1c0b4467558518c3 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Tue, 4 Mar 2025 19:11:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(core):=20=20hook=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=B7=BB=E5=8A=A0node=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/Node.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/Node.ts b/packages/core/src/Node.ts index ee1f1b70..664d9ca5 100644 --- a/packages/core/src/Node.ts +++ b/packages/core/src/Node.ts @@ -102,8 +102,9 @@ class Node extends EventEmitter { const { codeType = HookCodeType.CODE, codeId, params: itemParams = {} } = item; let functionContent: ((...args: any[]) => any) | string | undefined; - const functionParams: { app: TMagicApp; params: Record; dataSource?: DataSource } = { + const functionParams: { app: TMagicApp; node: Node; params: Record; dataSource?: DataSource } = { app: this.app, + node: this, params: params || itemParams, };