mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
Merge branch 'fix/getLazyElement' into 'release/1.0.0'
fix: 函数签名及方法名拼写问题 See merge request !1000357
This commit is contained in:
commit
69585964db
@ -18,8 +18,7 @@ export default class RaxProvider extends Provider {
|
||||
}
|
||||
const { componentName: layoutName, props: layoutProps } = layoutConfig;
|
||||
const { content: Layout, props: extraLayoutProps } = app.getLayout(layoutName) || {};
|
||||
const sectionalRender = this.isSectionalRender();
|
||||
if (!sectionalRender && Layout) {
|
||||
if (!this.isSectionalRender && Layout) {
|
||||
App = (props) => createElement(
|
||||
Layout,
|
||||
{ ...layoutProps, ...extraLayoutProps },
|
||||
@ -89,8 +88,8 @@ export default class RaxProvider extends Provider {
|
||||
if (!pageId) {
|
||||
return null;
|
||||
}
|
||||
if (this.getlazyElement(pageId)) {
|
||||
return this.getlazyElement(pageId);
|
||||
if (this.getLazyElement(pageId)) {
|
||||
return this.getLazyElement(pageId);
|
||||
}
|
||||
const lazyElement = createElement(LazyComponent, {
|
||||
// eslint-disable-next-line no-return-await
|
||||
@ -98,7 +97,7 @@ export default class RaxProvider extends Provider {
|
||||
key: pageId,
|
||||
...props,
|
||||
});
|
||||
this.setlazyElement(pageId, lazyElement);
|
||||
this.setLazyElement(pageId, lazyElement);
|
||||
return lazyElement;
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,5 +55,5 @@
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npm.alibaba-inc.com"
|
||||
},
|
||||
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@1.0.7-0/build/index.html"
|
||||
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@1.0.8-0/build/index.html"
|
||||
}
|
||||
|
||||
@ -140,7 +140,17 @@ export default class Provider {
|
||||
if (!appData) {
|
||||
return;
|
||||
}
|
||||
const { history, layout, routes, containerId, components, componentsMap, utils, constants, i18n } = appData;
|
||||
const {
|
||||
history,
|
||||
layout,
|
||||
routes,
|
||||
containerId,
|
||||
components,
|
||||
componentsMap,
|
||||
utils,
|
||||
constants,
|
||||
i18n,
|
||||
} = appData;
|
||||
this.setHistory(history);
|
||||
this.setLayoutConfig(layout);
|
||||
this.setRouterConfig(routes);
|
||||
@ -181,20 +191,20 @@ export default class Provider {
|
||||
this.emitter.on('ready', cb);
|
||||
}
|
||||
|
||||
emitPageReady() {
|
||||
this.emitter.emit('pageReady');
|
||||
emitPageReady(data?: any) {
|
||||
this.emitter.emit('pageReady', data || '');
|
||||
}
|
||||
|
||||
emitPageEnter() {
|
||||
this.emitter.emit('pageEnter');
|
||||
emitPageEnter(data?: any) {
|
||||
this.emitter.emit('pageEnter', data || '');
|
||||
}
|
||||
|
||||
emitPageUpdate() {
|
||||
this.emitter.emit('pageUpdate');
|
||||
emitPageUpdate(data?: any) {
|
||||
this.emitter.emit('pageUpdate', data || '');
|
||||
}
|
||||
|
||||
emitPageLeave() {
|
||||
this.emitter.emit('pageLeave');
|
||||
emitPageLeave(data?: any) {
|
||||
this.emitter.emit('pageLeave', data || '');
|
||||
}
|
||||
|
||||
onPageReady(cb: (params?: any) => void) {
|
||||
@ -229,11 +239,13 @@ export default class Provider {
|
||||
throw new Error('Method called "getAppData" not implemented.');
|
||||
}
|
||||
|
||||
getPageData(): any {
|
||||
// eslint-disable-next-line
|
||||
getPageData(pageId: string): any {
|
||||
throw new Error('Method called "getPageData" not implemented.');
|
||||
}
|
||||
|
||||
getLazyComponent(): any {
|
||||
// eslint-disable-next-line
|
||||
getLazyComponent(pageId: string, props: any): any {
|
||||
throw new Error('Method called "getLazyComponent" not implemented.');
|
||||
}
|
||||
|
||||
@ -242,7 +254,8 @@ export default class Provider {
|
||||
throw new Error('Method called "createApp" not implemented.');
|
||||
}
|
||||
|
||||
runApp() {
|
||||
// eslint-disable-next-line
|
||||
runApp(App: any, config: IAppConfig) {
|
||||
throw new Error('Method called "runApp" not implemented.');
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user