add ts define

This commit is contained in:
pengfei.zhou
2020-04-09 17:07:24 +08:00
committed by osborn
parent dd06675253
commit 404b4b594f
13 changed files with 485 additions and 1 deletions

View File

@@ -91,4 +91,21 @@ export function vlayout(views: View[], config?: IVLayout) {
}
}
return ret
}
export class FlexLayout extends Group {
}
export function flexlayout(views: View[], config: IView) {
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)
}
}
}