#鸿蒙学习大百科#如何在控件上方显示气泡?

如何在控件上方显示气泡?

HarmonyOS
2024-10-25 10:05:29
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
重庆大镖客
@State isShowPop:boolean  = false
build() {
  Column() {
    Button("气泡提示")
      .onClick(()=>{
        this.isShowPop = true
      })
      //设置placement为Top,气泡显示在button上方
      .bindPopup(this.isShowPop,{message:"Hello HarmonyOS",placement:Placement.Top})

  }
  .width('100%')
  .height('100%')
  .justifyContent(FlexAlign.Center)
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
分享
微博
QQ
微信
回复
2024-10-25 16:39:24


相关问题
#鸿蒙学习大百科#ArkTS如何生成xml?
1233浏览 • 1回复 待解决
#鸿蒙学习大百科#什么是LocalStorage?
1120浏览 • 1回复 待解决
#鸿蒙学习大百科#什么是AppStorage?
970浏览 • 1回复 待解决
#鸿蒙学习大百科#如何实现ui优化?
1023浏览 • 1回复 待解决