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,
|
itemCount: this.data.length,
|
||||||
renderItem: (idx) => {
|
renderItem: (idx) => {
|
||||||
if (idx % 3 === 0) {
|
if (idx % 3 === 0) {
|
||||||
return listItem(scroller(
|
return listItem(
|
||||||
|
scroller(
|
||||||
hlayout([
|
hlayout([
|
||||||
stack([]).apply({
|
stack([]).apply({
|
||||||
layoutConfig: layoutConfig().justWidth().justHeight(),
|
layoutConfig: layoutConfig().justWidth().justHeight(),
|
||||||
@ -55,14 +56,16 @@ class ScrollerInListDemo extends Panel {
|
|||||||
space: 10,
|
space: 10,
|
||||||
})
|
})
|
||||||
).apply({
|
).apply({
|
||||||
layoutConfig: layoutConfig().fitWidth().justHeight(),
|
layoutConfig: layoutConfig().just(),
|
||||||
height: 100,
|
height: 80,
|
||||||
}))
|
width: Environment.screenWidth,
|
||||||
|
})
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
return listItem(scroller(
|
return listItem(
|
||||||
hlayout([
|
hlayout([
|
||||||
stack([]).apply({
|
stack([]).apply({
|
||||||
layoutConfig: layoutConfig().justWidth().justHeight(),
|
layoutConfig: layoutConfig().just(),
|
||||||
height: 80,
|
height: 80,
|
||||||
width: Environment.screenWidth,
|
width: Environment.screenWidth,
|
||||||
backgroundColor: colors[idx % colors.length],
|
backgroundColor: colors[idx % colors.length],
|
||||||
@ -70,10 +73,7 @@ class ScrollerInListDemo extends Panel {
|
|||||||
]).apply({
|
]).apply({
|
||||||
space: 10,
|
space: 10,
|
||||||
})
|
})
|
||||||
).apply({
|
)
|
||||||
layoutConfig: layoutConfig().fitWidth().justHeight(),
|
|
||||||
height: 100,
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
layoutConfig: layoutConfig().most(),
|
layoutConfig: layoutConfig().most(),
|
||||||
|
Reference in New Issue
Block a user