iOS:add FlexLayoutNode
This commit is contained in:
3
doric-js/lib/src/widget/layouts.d.ts
vendored
3
doric-js/lib/src/widget/layouts.d.ts
vendored
@@ -25,4 +25,7 @@ export declare class HLayout extends LinearLayout implements IHLayout {
|
||||
export declare function stack(views: View[], config?: IStack): Stack;
|
||||
export declare function hlayout(views: View[], config?: IHLayout): HLayout;
|
||||
export declare function vlayout(views: View[], config?: IVLayout): VLayout;
|
||||
export declare class FlexLayout extends Group {
|
||||
}
|
||||
export declare function flexlayout(views: View[], config: IView): FlexLayout;
|
||||
export {};
|
||||
|
@@ -82,3 +82,17 @@ export function vlayout(views, config) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
export class FlexLayout extends Group {
|
||||
}
|
||||
export function flexlayout(views, config) {
|
||||
const ret = new FlexLayout;
|
||||
for (let v of views) {
|
||||
ret.addChild(v);
|
||||
}
|
||||
if (config) {
|
||||
for (let key in config) {
|
||||
Reflect.set(ret, key, Reflect.get(config, key, config), ret);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user