SideBarContainer
提供側邊欄可以顯示和隱藏的側邊欄容器,通過子組件定義側邊欄和內容區(qū),第一個子組件表示側邊欄,第二個子組件表示內容區(qū)。
遮罩
在內容區(qū)設置遮罩層組件,并設置背景和層級,通過this.show在側邊欄展開時顯示遮罩
Stack() { //內容 //遮罩 if(this.show){ Column() { } .width('100%') .height('100%') .backgroundColor('#90000000') .zIndex(9) } } .onClick(() => { animateTo({ duration: 100, curve: Curve.EaseOut, playMode: PlayMode.Normal, }, () => { this.show = false; }) }) .width('100%') .height('100%')
標簽:
#鴻蒙開發(fā)
- 版權所有:奇站網絡 轉載請注明出處
- 廈門奇站網絡科技有限公司,專業(yè)提供網站建設,響應式網站建設,小程序開發(fā),系統(tǒng)定制開發(fā)。
- 軟件開發(fā)咨詢熱線:吳小姐 13313868605