HarmonyOS 自定义弹窗点击跳转问题

在PageA中点击按钮显示【自定义弹窗】,在【自定义弹窗】中点击按钮(不关闭弹窗)打开PageB,如何让PageB在弹窗上层(PageB完全覆盖弹窗)而不是下层展示?

HarmonyOS
2024-12-26 16:17:34
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
zbw_apple

参考:

Column() {
  GridRow({
    columns: { xs: 1, sm: 4, md: 8, lg: 12 },
    breakpoints: { value: ["400vp", "600vp", "800vp"],
      reference: BreakpointsReference.WindowSize },
  }) {
    GridCol({
      span: { xs: 1, sm: 2, md: 4, lg: 8 },
      offset: { xs: 0, sm: 1, md: 2, lg: 2 }
    }) {
      Column() {
        Text('跳转吗').fontSize(16).margin({ bottom: 10 })
        Flex({ justifyContent: FlexAlign.SpaceAround }) {
          Button('取消')
            .onClick(() => {
              if (this.visible == Visibility.Visible) {
                this.visible = Visibility.None
              } else {
                this.visible = Visibility.Visible
              }

            }).backgroundColor(0xffffff).fontColor(Color.Black)
          Button('确定')
            .onClick(() => {
              this.pageInfos.pushPath({ name: 'pageOne' })
            }).backgroundColor(0xffffff).fontColor(Color.Red)
        }.margin({ bottom: 10 })
      }
      .backgroundColor(0xffffff)
      .visibility(this.visible)
      .clip(true)
      .borderRadius(20)
    }
  }
}.width('100%') //设置弹窗宽度
}
}.width('100%').margin({ top: 5 })
}.navDestination(this.PageMap)
}
}
分享
微博
QQ
微信
回复
2024-12-26 17:31:35
相关问题
HarmonyOS 自定义弹窗CustomDialog 问题
350浏览 • 1回复 待解决
HarmonyOS 自定义弹窗控制问题
532浏览 • 1回复 待解决
HarmonyOS 自定义弹窗关闭问题
417浏览 • 1回复 待解决
HarmonyOS 自定义弹窗层级问题
524浏览 • 1回复 待解决
HarmonyOS 自定义弹窗CustomDialog问题
933浏览 • 1回复 待解决
HarmonyOS 自定义弹窗问题
1203浏览 • 1回复 待解决
HarmonyOS 自定义弹窗 (CustomDialog)问题
846浏览 • 1回复 待解决
HarmonyOS 自定义弹窗封装问题
370浏览 • 1回复 待解决
HarmonyOS 自定义CustomDialog 跳转问题
325浏览 • 1回复 待解决
自定义弹窗使用相关问题
1308浏览 • 1回复 待解决
HarmonyOS 自定义弹窗刷新问题
316浏览 • 1回复 待解决
HarmonyOS 自定义弹窗部分问题答疑
756浏览 • 1回复 待解决
HarmonyOS 自定义弹窗不能显示问题
414浏览 • 1回复 待解决
自定义弹窗自定义转场动画
1489浏览 • 1回复 待解决