mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-03-19 04:03:47 +00:00
feat(core): runDataSourceMethod 返回 await 方法的执行结果
This commit is contained in:
parent
5ae667b7ee
commit
92bd5cf942
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user