feat: slider add bounces for iOS

This commit is contained in:
pengfei.zhou
2021-04-30 14:28:38 +08:00
committed by osborn
parent f8b983b8d2
commit e621db48b9
11 changed files with 52 additions and 1 deletions

View File

@@ -73,6 +73,30 @@ class SliderPanel extends Panel {
space: 10,
backgroundColor: Color.RED,
}),
hlayout([
text({
text: "Bounces",
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.JUST,
},
textSize: 20,
textColor: Color.BLACK,
textAlignment: gravity().center(),
height: 50,
}),
switchView({
state: true,
onSwitch: (state) => {
pager.bounces = state
},
}),
], {
layoutConfig: layoutConfig().most().configHeight(LayoutSpec.FIT),
gravity: gravity().center(),
space: 10,
backgroundColor: Color.RED,
}),
pager,
]).also(it => {
it.layoutConfig = {