AlertDialog只能设置autoCancel点击时取消,或者在点击定义的按钮时取消,如果想通过方法调用取消的话可以尝试使用自定义弹窗CustomDialogAlertDialog参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-refere...CustomDialog参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-refere...
AlertDialog只能设置autoCancel点击时取消,或者在点击定义的按钮时取消,如果想通过方法调用取消的话可以尝试使用自定义弹窗CustomDialog
AlertDialog参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-refere...
CustomDialog参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-refere...