feat:refact SliderDemo

This commit is contained in:
pengfei.zhou
2019-11-20 11:58:35 +08:00
parent d31a5caffd
commit 1245bbd08e
5 changed files with 38 additions and 40 deletions

View File

@@ -148,7 +148,7 @@ export class LayoutConfigImpl implements LayoutConfig, Modeling {
widthSpec: this.widthSpec,
heightSpec: this.heightSpec,
margin: this.margin,
alignment: this.alignment,
alignment: this.alignment ? this.alignment.toModel() : undefined,
weight: this.weight,
}
}

View File

@@ -5,7 +5,7 @@ export function slideItem(item: View) {
return (new SlideItem).also((it) => {
it.layoutConfig = {
widthSpec: LayoutSpec.AT_MOST,
heightSpec: LayoutSpec.WRAP_CONTENT,
heightSpec: LayoutSpec.AT_MOST,
}
it.addChild(item)
})