半屏底部弹出框,需要包含底部安全域,CustomDialog是否有参数设置,或者其他方案代替
@CustomDialog
struct CustomDialogExample {
cancel?: () => void
confirm?: () => void
controller: CustomDialogController
build() {
Column() {
}.backgroundColor("#FFF").height(200).width('100%')
}
}
dialogController: CustomDialogController = new CustomDialogController({
builder: CustomDialogExample({
cancel: ()=> { this.onCancel() },
confirm: ()=> { this.onAccept() },
}),
width: px2vp(this.windowWidth),
height: 200,
customStyle:true
})
看下这个demo