未验证 提交 07c35bb9 编写于 作者: O openharmony_ci 提交者: Gitee

!8819 更新SideBarContainer示例代码

Merge pull request !8819 from xuzhidan/master
...@@ -76,8 +76,8 @@ SideBarContainer( type?: SideBarContainerType ) ...@@ -76,8 +76,8 @@ SideBarContainer( type?: SideBarContainerType )
@Entry @Entry
@Component @Component
struct SideBarContainerExample { struct SideBarContainerExample {
normalIcon : Resource = $r("app.media.user") normalIcon : Resource = $r("app.media.icon")
selectedIcon: Resource = $r("app.media.userFull") selectedIcon: Resource = $r("app.media.icon")
@State arr: number[] = [1, 2, 3] @State arr: number[] = [1, 2, 3]
@State current: number = 1 @State current: number = 1
...@@ -100,18 +100,17 @@ struct SideBarContainerExample { ...@@ -100,18 +100,17 @@ struct SideBarContainerExample {
}.width('100%') }.width('100%')
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
.backgroundColor('#19000000') .backgroundColor('#19000000')
RowSplit() {
Column(){
Text('Split page one').fontSize(30) Column() {
}.justifyContent(FlexAlign.Center) Text('SideBarContainer content text1').fontSize(25)
Column(){ Text('SideBarContainer content text2').fontSize(25)
Text('Split page two').fontSize(30) }
}.justifyContent(FlexAlign.Center) .margin({ top: 50, left: 20, right: 30 })
}.width('100%')
} }
.sideBarWidth(240) .sideBarWidth(150)
.minSideBarWidth(210) .minSideBarWidth(50)
.maxSideBarWidth(260) .maxSideBarWidth(300)
.onChange((value: boolean) => { .onChange((value: boolean) => {
console.info('status:' + value) console.info('status:' + value)
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册