From 92bd5cf942e2686711fe17fe15eea47632f5180b Mon Sep 17 00:00:00 2001 From: moonszhang Date: Wed, 18 Mar 2026 09:15:01 +0000 Subject: [PATCH] =?UTF-8?q?feat(core):=20runDataSourceMethod=20=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=20await=20=E6=96=B9=E6=B3=95=E7=9A=84=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/App.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/src/App.ts b/packages/core/src/App.ts index 648c2aa0..14d17ec6 100644 --- a/packages/core/src/App.ts +++ b/packages/core/src/App.ts @@ -293,9 +293,11 @@ class App extends EventEmitter { const method = methods.find((item) => item.name === methodName); if (method && typeof method.content === 'function') { - await method.content({ app: this, params, dataSource, eventParams: args, flowState, node }); - } else if (typeof dataSource[methodName] === 'function') { - await dataSource[methodName](); + return await method.content({ app: this, params, dataSource, eventParams: args, flowState, node }); + } + + if (typeof dataSource[methodName] === 'function') { + return await dataSource[methodName](); } } catch (e: any) { if (this.errorHandler) {