mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-07 02:47:12 +00:00
fix: 函数签名及方法名拼写问题
This commit is contained in:
parent
0428b5c302
commit
e05790b4fa
@ -18,8 +18,7 @@ export default class RaxProvider extends Provider {
|
|||||||
}
|
}
|
||||||
const { componentName: layoutName, props: layoutProps } = layoutConfig;
|
const { componentName: layoutName, props: layoutProps } = layoutConfig;
|
||||||
const { content: Layout, props: extraLayoutProps } = app.getLayout(layoutName) || {};
|
const { content: Layout, props: extraLayoutProps } = app.getLayout(layoutName) || {};
|
||||||
const sectionalRender = this.isSectionalRender();
|
if (!this.isSectionalRender && Layout) {
|
||||||
if (!sectionalRender && Layout) {
|
|
||||||
App = (props) => createElement(
|
App = (props) => createElement(
|
||||||
Layout,
|
Layout,
|
||||||
{ ...layoutProps, ...extraLayoutProps },
|
{ ...layoutProps, ...extraLayoutProps },
|
||||||
@ -89,8 +88,8 @@ export default class RaxProvider extends Provider {
|
|||||||
if (!pageId) {
|
if (!pageId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (this.getlazyElement(pageId)) {
|
if (this.getLazyElement(pageId)) {
|
||||||
return this.getlazyElement(pageId);
|
return this.getLazyElement(pageId);
|
||||||
}
|
}
|
||||||
const lazyElement = createElement(LazyComponent, {
|
const lazyElement = createElement(LazyComponent, {
|
||||||
// eslint-disable-next-line no-return-await
|
// eslint-disable-next-line no-return-await
|
||||||
@ -98,7 +97,7 @@ export default class RaxProvider extends Provider {
|
|||||||
key: pageId,
|
key: pageId,
|
||||||
...props,
|
...props,
|
||||||
});
|
});
|
||||||
this.setlazyElement(pageId, lazyElement);
|
this.setLazyElement(pageId, lazyElement);
|
||||||
return lazyElement;
|
return lazyElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,5 +55,5 @@
|
|||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://registry.npm.alibaba-inc.com"
|
"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) {
|
if (!appData) {
|
||||||
return;
|
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.setHistory(history);
|
||||||
this.setLayoutConfig(layout);
|
this.setLayoutConfig(layout);
|
||||||
this.setRouterConfig(routes);
|
this.setRouterConfig(routes);
|
||||||
@ -181,20 +191,20 @@ export default class Provider {
|
|||||||
this.emitter.on('ready', cb);
|
this.emitter.on('ready', cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
emitPageReady() {
|
emitPageReady(data?: any) {
|
||||||
this.emitter.emit('pageReady');
|
this.emitter.emit('pageReady', data || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
emitPageEnter() {
|
emitPageEnter(data?: any) {
|
||||||
this.emitter.emit('pageEnter');
|
this.emitter.emit('pageEnter', data || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
emitPageUpdate() {
|
emitPageUpdate(data?: any) {
|
||||||
this.emitter.emit('pageUpdate');
|
this.emitter.emit('pageUpdate', data || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
emitPageLeave() {
|
emitPageLeave(data?: any) {
|
||||||
this.emitter.emit('pageLeave');
|
this.emitter.emit('pageLeave', data || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
onPageReady(cb: (params?: any) => void) {
|
onPageReady(cb: (params?: any) => void) {
|
||||||
@ -229,11 +239,13 @@ export default class Provider {
|
|||||||
throw new Error('Method called "getAppData" not implemented.');
|
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.');
|
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.');
|
throw new Error('Method called "getLazyComponent" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +254,8 @@ export default class Provider {
|
|||||||
throw new Error('Method called "createApp" not implemented.');
|
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.');
|
throw new Error('Method called "runApp" not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user