promptAction.showToast({ message: 'nreivn' })
AlertDialog.show()
@Entry @Component struct Parent{ controller: CustomDialogController = new CustomDialogController({ builder: Son1(), autoCancel: true, offset: { dx: 0, dy: 0 }, customStyle: false, cornerRadius: 20, width: '100%', height: '100%', borderWidth: 1, }) build(){ this.controller.open() } }
@CustomDialog export struct Son1{ Controller1: CustomDialogController = new CustomDialogController({ builder: Son1(), autoCancel: true, offset: { dx: 0, dy: 0 }, customStyle: false, cornerRadius: 20, width: '100%', height: '100%', borderWidth: 1, }) Controller2: CustomDialogController = new CustomDialogController({ builder: Son2(), autoCancel: true, offset: { dx: 0, dy: 0 }, customStyle: false, cornerRadius: 20, width: '100%', height: '100%', borderWidth: 1, }) build(){ this.Controller1.close() this.controller2.open() } }
@CustomDialog export struct Son2{ dialogController: CustomDialogController = new CustomDialogController({ builder: Son2(), autoCancel: true, offset: { dx: 0, dy: 0 }, customStyle: false, cornerRadius: 20, width: '100%', height: '100%', borderWidth: 1, }) build(){ this.dialogController.close() } }
|