HarmonyOS targetSpace不生效问题?

在使用bindPopup时,发现在屏幕中间位置使用targetSpace距离正常,但是屏幕两侧时targetSpace展示距离太大,导致UI展示异常。代码如下:

.bindPopup(this.handlePopup, {
  // CustomPopupOptions类型气泡的内容
  builder: this.popupBuilder,
  placement: Placement.Top,
  targetSpace: -10,
  enableArrow: true, // 气泡弹出时不显示箭头
  popupColor: "#333333",
  backgroundBlurStyle: BlurStyle.NONE, // 关闭气泡的模糊背景
  showInSubWindow:true,
  arrowWidth:10,
  arrowHeight:4,
阅读 601
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进