Skip to content

Commit

Permalink
0.3.1 ZLView onReactRefCallback获取的DOM节点可能为null(错误使用WeakRef引起)
Browse files Browse the repository at this point in the history
  • Loading branch information
gm958spanda committed Jul 5, 2021
1 parent a72d41c commit c661d19
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,5 @@ router.pushViewPage(OtherPage);
* ZLView添加borderRadius属性
* ZLView支持直接添加JSX元素
### 0.3.1
* ZLView onReactRefCallback获取的DOM节点可能为null(错误使用WeakRef引起)
2 changes: 1 addition & 1 deletion src/demo/ScrollPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class ScrollPage extends zl.ViewPage
}
this.timer_id = setInterval(()=>{

// scrollView.scrollTo(0, scrollView.contentOffSetY + 2);
scrollView.scrollTo(0, scrollView.contentOffSetY + 2);
// scrollView.subViews?.getElementAt(0).removeFromSuperview();
// scrollView.refresh();
},100);
Expand Down
2 changes: 1 addition & 1 deletion src/zlkit/sugar/eventcb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class ZLEventCallbackList
* 获取事件名称对应的回调函数列表
* @param name 事件名称
*/
public getEventCallbackList(name:string):Map<any,any> | undefined
public getEventCallbackList(name:string)
{
return this.__zl_EventHandlerMap__?.get(name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/zlkit/zlview/ZLView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export class ZLView extends ZLObject
}
if (OnRefCallbackMap) {
OnRefCallbackMap.forEach((cbThis,cb)=>{
cb.call(cbThis,e);
cb.call(cbThis?.deref(),e);
});
}
}
Expand Down

0 comments on commit c661d19

Please sign in to comment.