提交 baa3b997 编写于 作者: Z zhangrongjie 提交者: 张荣杰

fixed 462ca2a6 from https://gitee.com/rongShao-Z/docs/pulls/17016

modify the scrollBar sample document
Signed-off-by: Nzhangrongjie <zhangrongjie4@huawei.com>
Change-Id: I29be46e3788ffd784ac8d9fe342404c7b04e0bca
上级 3db635a6
......@@ -45,7 +45,7 @@ ScrollBar(value: { scroller: Scroller, direction?: ScrollBarDirection, state?: B
@Component
struct ScrollBarExample {
private scroller: Scroller = new Scroller()
private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
build() {
Column() {
......@@ -55,8 +55,8 @@ struct ScrollBarExample {
ForEach(this.arr, (item) => {
Row() {
Text(item.toString())
.width('90%')
.height(100)
.width('80%')
.height(60)
.backgroundColor('#3366CC')
.borderRadius(15)
.fontSize(16)
......@@ -64,17 +64,18 @@ struct ScrollBarExample {
.margin({ top: 5 })
}
}, item => item)
}.margin({ right: 52 })
}.margin({ right: 15 })
}
.width('90%')
.scrollBar(BarState.Off)
.scrollable(ScrollDirection.Vertical)
ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.Auto }) {
Text()
.width(30)
.width(20)
.height(100)
.borderRadius(10)
.backgroundColor('#C0C0C0')
}.width(30).backgroundColor('#ededed')
}.width(20).backgroundColor('#ededed')
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册