mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-18 21:38:14 +00:00
style: runtime
This commit is contained in:
parent
692288bae8
commit
a8ffb0d773
@ -56,7 +56,7 @@ export interface DataSourceItem {
|
|||||||
type: string;
|
type: string;
|
||||||
options: {
|
options: {
|
||||||
uri: string;
|
uri: string;
|
||||||
params: object;
|
params: Record<string, unknown>;
|
||||||
method: string;
|
method: string;
|
||||||
shouldFetch?: string;
|
shouldFetch?: string;
|
||||||
willFetch?: string;
|
willFetch?: string;
|
||||||
@ -121,6 +121,7 @@ export default class Provider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async(): Promise<IAppConfig> {
|
async(): Promise<IAppConfig> {
|
||||||
|
// eslint-disable-next-line no-async-promise-executor
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const appData: IAppData = await this.getAppData();
|
const appData: IAppData = await this.getAppData();
|
||||||
@ -216,11 +217,11 @@ export default class Provider {
|
|||||||
throw new Error('Method called "getAppData" not implemented.');
|
throw new Error('Method called "getAppData" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageData(pageId?: string): any {
|
getPageData(): any {
|
||||||
throw new Error('Method called "getPageData" not implemented.');
|
throw new Error('Method called "getPageData" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
getLazyComponent(pageId: string, props: any): any {
|
getLazyComponent(): any {
|
||||||
throw new Error('Method called "getLazyComponent" not implemented.');
|
throw new Error('Method called "getLazyComponent" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +230,7 @@ export default class Provider {
|
|||||||
throw new Error('Method called "createApp" not implemented.');
|
throw new Error('Method called "createApp" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
runApp(App: any, config: IAppConfig) {
|
runApp() {
|
||||||
throw new Error('Method called "runApp" not implemented.');
|
throw new Error('Method called "runApp" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,15 +37,15 @@ export default function runApp() {
|
|||||||
const App = provider.createApp();
|
const App = provider.createApp();
|
||||||
provider.runApp(App, config);
|
provider.runApp(App, config);
|
||||||
}).catch((err: Error) => {
|
}).catch((err: Error) => {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
const { fallbackUI, afterCatch } = app.getErrorBoundary() || {};
|
const { fallbackUI, afterCatch } = app.getErrorBoundary() || {};
|
||||||
if (typeof afterCatch === 'function') {
|
if (typeof afterCatch === 'function') {
|
||||||
afterCatch(err.message, err.stack);
|
afterCatch(err.message, err.stack);
|
||||||
}
|
}
|
||||||
if (!fallbackUI) {
|
if (!fallbackUI) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
provider.runApp(fallbackUI, {});
|
provider.runApp(fallbackUI, {});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user