mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-03-23 14:02:35 +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);
|
const method = methods.find((item) => item.name === methodName);
|
||||||
if (method && typeof method.content === 'function') {
|
if (method && typeof method.content === 'function') {
|
||||||
await method.content({ app: this, params, dataSource, eventParams: args, flowState, node });
|
return await method.content({ app: this, params, dataSource, eventParams: args, flowState, node });
|
||||||
} else if (typeof dataSource[methodName] === 'function') {
|
}
|
||||||
await dataSource[methodName]();
|
|
||||||
|
if (typeof dataSource[methodName] === 'function') {
|
||||||
|
return await dataSource[methodName]();
|
||||||
}
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
if (this.errorHandler) {
|
if (this.errorHandler) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user