可以设置dialog的customStyle为true,然后自己写dialog页面,就可以铺满了,参考:@CustomDialog struct CustomDialogExample { controller?: CustomDialogController build() { Column() { Text('我是弹窗!') }.width('100%').height('35%').backgroundColor(Color.White).borderRadius(32) } } @Entry @Component struct TextInputDemo { @State message: string = ''; currentIndex: number = 0; inputController: TextInputController = new TextInputController() dialogController: CustomDialogController = new CustomDialogController({ builder: CustomDialogExample(), autoCancel: true, alignment: DialogAlignment.Bottom, customStyle: true, isModal: true })
可以设置dialog的customStyle为true,然后自己写dialog页面,就可以铺满了,参考: