update scroller in list demo
This commit is contained in:
parent
0926c923c9
commit
87501e0eb3
@ -13,7 +13,8 @@ class ScrollerInListDemo extends Panel {
|
||||
itemCount: this.data.length,
|
||||
renderItem: (idx) => {
|
||||
if (idx % 3 === 0) {
|
||||
return listItem(scroller(
|
||||
return listItem(
|
||||
scroller(
|
||||
hlayout([
|
||||
stack([]).apply({
|
||||
layoutConfig: layoutConfig().justWidth().justHeight(),
|
||||
@ -55,14 +56,16 @@ class ScrollerInListDemo extends Panel {
|
||||
space: 10,
|
||||
})
|
||||
).apply({
|
||||
layoutConfig: layoutConfig().fitWidth().justHeight(),
|
||||
height: 100,
|
||||
}))
|
||||
layoutConfig: layoutConfig().just(),
|
||||
height: 80,
|
||||
width: Environment.screenWidth,
|
||||
})
|
||||
)
|
||||
} else {
|
||||
return listItem(scroller(
|
||||
return listItem(
|
||||
hlayout([
|
||||
stack([]).apply({
|
||||
layoutConfig: layoutConfig().justWidth().justHeight(),
|
||||
layoutConfig: layoutConfig().just(),
|
||||
height: 80,
|
||||
width: Environment.screenWidth,
|
||||
backgroundColor: colors[idx % colors.length],
|
||||
@ -70,10 +73,7 @@ class ScrollerInListDemo extends Panel {
|
||||
]).apply({
|
||||
space: 10,
|
||||
})
|
||||
).apply({
|
||||
layoutConfig: layoutConfig().fitWidth().justHeight(),
|
||||
height: 100,
|
||||
}))
|
||||
)
|
||||
}
|
||||
},
|
||||
layoutConfig: layoutConfig().most(),
|
||||
|
Reference in New Issue
Block a user