fix: 修复 JSSlot 被转成 i18n 结构

refactor: 优化 getNodeInstance 的循环出口
This commit is contained in:
力皓 2020-10-19 19:10:27 +08:00
parent 17e1f07cb7
commit f2c3292210
3 changed files with 4 additions and 1 deletions

View File

@ -124,6 +124,8 @@ designer.addPropsReducer((props, node) => {
if (isUseI18NSetter(node.componentMeta.prototype, item.name) &&
!isI18NObject(ov) &&
!isJSExpression(ov) &&
!isJSBlock(ov) &&
!isJSSlot(ov) &&
!isVariable(ov)) {
newProps[item.name] = convertToI18NObject(v);
}

View File

@ -54,5 +54,5 @@
"publishConfig": {
"registry": "http://registry.npm.alibaba-inc.com"
},
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@0.13.1-1/build/index.html"
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@0.13.1-2/build/index.html"
}

View File

@ -468,6 +468,7 @@ function getNodeInstance(fiberNode: any, specId?: string): NodeInstance<ReactIns
};
}
}
if (!instance && !fiberNode?.return) return null;
return getNodeInstance(fiberNode?.return);
}