mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-25 11:28:18 +00:00
Merge branch feat/addRendererName into feat/0.16.14
Title: feat: add renderer rendererName prop Link: https://code.aone.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/codereview/6678581
This commit is contained in:
commit
b878569bbc
@ -211,6 +211,7 @@ class Renderer extends Component<{
|
|||||||
}}
|
}}
|
||||||
documentId={document.id}
|
documentId={document.id}
|
||||||
getNode={(id: string) => documentInstance.getNode(id) as any}
|
getNode={(id: string) => documentInstance.getNode(id) as any}
|
||||||
|
rendererName="PageRenderer"
|
||||||
customCreateElement={(Component: any, props: any, children: any) => {
|
customCreateElement={(Component: any, props: any, children: any) => {
|
||||||
const { __id, ...viewProps } = props;
|
const { __id, ...viewProps } = props;
|
||||||
viewProps.componentId = __id;
|
viewProps.componentId = __id;
|
||||||
|
|||||||
@ -525,6 +525,7 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
|
|||||||
designMode: renderer.designMode,
|
designMode: renderer.designMode,
|
||||||
device: renderer.device,
|
device: renderer.device,
|
||||||
appHelper: renderer.context,
|
appHelper: renderer.context,
|
||||||
|
rendererName: 'LowCodeRenderer',
|
||||||
customCreateElement: (Comp: any, props: any, children: any) => {
|
customCreateElement: (Comp: any, props: any, children: any) => {
|
||||||
const componentMeta = host.currentDocument?.getComponentMeta(Comp.displayName);
|
const componentMeta = host.currentDocument?.getComponentMeta(Comp.displayName);
|
||||||
if (componentMeta?.isModal) {
|
if (componentMeta?.isModal) {
|
||||||
|
|||||||
@ -176,6 +176,7 @@ class Renderer extends Component<{
|
|||||||
suspended={renderer.suspended}
|
suspended={renderer.suspended}
|
||||||
self={renderer.scope}
|
self={renderer.scope}
|
||||||
getNode={(id: string) => documentInstance.getNode(id) as Node}
|
getNode={(id: string) => documentInstance.getNode(id) as Node}
|
||||||
|
rendererName="PageRenderer"
|
||||||
customCreateElement={(Component: any, props: any, children: any) => {
|
customCreateElement={(Component: any, props: any, children: any) => {
|
||||||
const { __id, ...viewProps } = props;
|
const { __id, ...viewProps } = props;
|
||||||
viewProps.componentId = __id;
|
viewProps.componentId = __id;
|
||||||
|
|||||||
@ -453,6 +453,7 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
|
|||||||
designMode: renderer.designMode,
|
designMode: renderer.designMode,
|
||||||
device: renderer.device,
|
device: renderer.device,
|
||||||
appHelper: renderer.context,
|
appHelper: renderer.context,
|
||||||
|
rendererName: 'LowCodeRenderer',
|
||||||
customCreateElement: (Comp: any, props: any, children: any) => {
|
customCreateElement: (Comp: any, props: any, children: any) => {
|
||||||
const componentMeta = host.currentDocument?.getComponentMeta(Comp.displayName);
|
const componentMeta = host.currentDocument?.getComponentMeta(Comp.displayName);
|
||||||
if (componentMeta?.isModal) {
|
if (componentMeta?.isModal) {
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export interface IProps {
|
|||||||
onCompGetRef?: (schema: ISchema, ref: any) => void;
|
onCompGetRef?: (schema: ISchema, ref: any) => void;
|
||||||
onCompGetCtx?: (schema: ISchema, ref: any) => void;
|
onCompGetCtx?: (schema: ISchema, ref: any) => void;
|
||||||
customCreateElement?: (...args: any) => any;
|
customCreateElement?: (...args: any) => any;
|
||||||
|
rendererName: string;
|
||||||
notFoundComponent?: any;
|
notFoundComponent?: any;
|
||||||
faultComponent?: any;
|
faultComponent?: any;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user