mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-18 21:38:14 +00:00
新增ref检测
This commit is contained in:
parent
7e7071f74f
commit
635b2e0091
@ -346,7 +346,7 @@ export default class BaseEngine extends Component {
|
|||||||
engine.createElement(
|
engine.createElement(
|
||||||
Comp,
|
Comp,
|
||||||
props,
|
props,
|
||||||
(!isFileSchema(schema)
|
(!isFileSchema(schema) &&
|
||||||
!!schema.children &&
|
!!schema.children &&
|
||||||
this.__createVirtualDom(
|
this.__createVirtualDom(
|
||||||
isJSExpression(schema.children) ? parseExpression(schema.children, self) : schema.children,
|
isJSExpression(schema.children) ? parseExpression(schema.children, self) : schema.children,
|
||||||
|
|||||||
@ -268,9 +268,7 @@ export function generateI18n(locale = 'zh-CN', messages = {}) {
|
|||||||
* @param {*} Comp 需要判断的组件
|
* @param {*} Comp 需要判断的组件
|
||||||
*/
|
*/
|
||||||
export function acceptsRef(Comp) {
|
export function acceptsRef(Comp) {
|
||||||
return (
|
return Comp && Comp.prototype && Comp.prototype.setState;
|
||||||
(Comp.$$typeof && Comp.$$typeof === REACT_FORWARD_REF_TYPE) || (Comp.prototype && Comp.prototype.isReactComponent)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user