optimize js code

This commit is contained in:
pengfei.zhou
2021-08-31 12:49:47 +08:00
committed by osborn
parent 612e5a4a07
commit 1b10106eb3
31 changed files with 109 additions and 271 deletions

View File

@@ -131,6 +131,7 @@ export declare abstract class View implements Modeling {
* Only affected when its superview or itself is FlexLayout.
*/
flexConfig?: FlexConfig;
set props(props: Partial<this>);
doAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;
clearAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;
cancelAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;

View File

@@ -200,6 +200,9 @@ export class View {
getLocationOnScreen(context) {
return this.nativeChannel(context, "getLocationOnScreen")();
}
set props(props) {
this.apply(props);
}
doAnimation(context, animation) {
return this.nativeChannel(context, "doAnimation")(animation.toModel()).then((args) => {
for (let key in args) {