mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-16 11:54:27 +00:00
Merge branch 'release/1.0.35' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into release/1.0.35
This commit is contained in:
commit
a2b34d7c02
@ -1,6 +1,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { Component, createElement, forwardRef } from 'rax';
|
import { Component, forwardRef } from 'rax';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { AppHelper } from '@ali/lowcode-utils';
|
import { AppHelper } from '@ali/lowcode-utils';
|
||||||
import { utils, contextFactory } from '@ali/lowcode-renderer-core';
|
import { utils, contextFactory } from '@ali/lowcode-renderer-core';
|
||||||
@ -36,7 +36,7 @@ export default function compFactory(schema, components = {}, componentsMap = {},
|
|||||||
// 低代码组件透传应用上下文
|
// 低代码组件透传应用上下文
|
||||||
const ctx = ['utils', 'constants', 'history', 'location', 'match'];
|
const ctx = ['utils', 'constants', 'history', 'location', 'match'];
|
||||||
ctx.forEach(key => {
|
ctx.forEach(key => {
|
||||||
if (!appHelper[key] && this.context && this.context.appHelper && this.context.appHelper[key]) {
|
if (!appHelper[key] && this.context?.appHelper && this.context?.appHelper[key]) {
|
||||||
appHelper.set(key, this.context.appHelper[key]);
|
appHelper.set(key, this.context.appHelper[key]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -60,7 +60,7 @@ export default function compFactory(schema, components = {}, componentsMap = {},
|
|||||||
{context => {
|
{context => {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
return (
|
return (
|
||||||
<CompEngine
|
<CompRenderer
|
||||||
{...props}
|
{...props}
|
||||||
__appHelper={appHelper}
|
__appHelper={appHelper}
|
||||||
__components={{ ...components, Component: CompRenderer, Block: BlockRenderer }}
|
__components={{ ...components, Component: CompRenderer, Block: BlockRenderer }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user