feat:fix when reloading wont work

This commit is contained in:
pengfei.zhou 2019-11-29 11:45:39 +08:00
parent a0a11fcb82
commit 5a440e30f4
2 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,7 @@ public class DoricContext {
public void reload(String script) {
this.script = script;
this.mRootNode.setId("");
getDriver().createContext(mContextId, script, source);
callEntity(DoricConstant.DORIC_ENTITY_INIT, this.initParams);
}

View File

@ -82,6 +82,7 @@ - (void)initContextWithWidth:(CGFloat)width height:(CGFloat)height {
}
- (void)reload:(NSString *)script {
self.rootNode.viewId = nil;
self.script = script;
[self.driver createContext:self.contextId script:script source:self.source];
[self callEntity:DORIC_ENTITY_INIT, self.initialParams, nil];