mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 17:48:13 +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
|
||||
|
||||
import { Component, createElement, forwardRef } from 'rax';
|
||||
import { Component, forwardRef } from 'rax';
|
||||
import PropTypes from 'prop-types';
|
||||
import { AppHelper } from '@ali/lowcode-utils';
|
||||
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'];
|
||||
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]);
|
||||
}
|
||||
});
|
||||
@ -60,7 +60,7 @@ export default function compFactory(schema, components = {}, componentsMap = {},
|
||||
{context => {
|
||||
this.context = context;
|
||||
return (
|
||||
<CompEngine
|
||||
<CompRenderer
|
||||
{...props}
|
||||
__appHelper={appHelper}
|
||||
__components={{ ...components, Component: CompRenderer, Block: BlockRenderer }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user