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