iOS:refact requestLayout logic

This commit is contained in:
pengfei.zhou
2020-04-08 11:57:38 +08:00
committed by osborn
parent 95d9158fac
commit b17ff48c59
11 changed files with 27 additions and 46 deletions

View File

@@ -41,9 +41,11 @@ - (void)render:(NSDictionary *)argument withPromise:(DoricPromise *)promise {
if (self.doricContext.rootNode.viewId == nil) {
self.doricContext.rootNode.viewId = viewId;
[self.doricContext.rootNode blend:argument[@"props"]];
[self.doricContext.rootNode requestLayout];
} else {
DoricViewNode *viewNode = [self.doricContext targetViewNode:viewId];
[viewNode blend:argument[@"props"]];
[viewNode requestLayout];
}
[promise resolve:nil];
});