From 7c2ba30bd55e7cce80ea20ab13eaae29e2f8b2e9 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Sat, 14 Mar 2020 17:07:59 +0800 Subject: [PATCH] set addOnRenderFinishedCallback to private --- doric-js/index.d.ts | 1 - doric-js/lib/src/ui/panel.d.ts | 2 +- doric-js/src/ui/panel.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doric-js/index.d.ts b/doric-js/index.d.ts index 72c00bdb..0ce9d81c 100644 --- a/doric-js/index.d.ts +++ b/doric-js/index.d.ts @@ -299,7 +299,6 @@ declare module 'doric/lib/src/ui/panel' { clearHeadViews(type: string): void; getRootView(): Root; getInitData(): object | undefined; - onRenderFinished(): void; addOnRenderFinishedCallback(cb: () => void): void; } } diff --git a/doric-js/lib/src/ui/panel.d.ts b/doric-js/lib/src/ui/panel.d.ts index a87b92ea..68bae0e5 100644 --- a/doric-js/lib/src/ui/panel.d.ts +++ b/doric-js/lib/src/ui/panel.d.ts @@ -30,6 +30,6 @@ export declare abstract class Panel { private nativeRender; private hookBeforeNativeCall; private hookAfterNativeCall; - onRenderFinished(): void; + private onRenderFinished; addOnRenderFinishedCallback(cb: () => void): void; } diff --git a/doric-js/src/ui/panel.ts b/doric-js/src/ui/panel.ts index 9b11fabd..99f19824 100644 --- a/doric-js/src/ui/panel.ts +++ b/doric-js/src/ui/panel.ts @@ -212,7 +212,7 @@ export abstract class Panel { this.onRenderFinished() }) } - onRenderFinished() { + private onRenderFinished() { this.onRenderFinishedCallback.forEach(e => { e() })