# UIAlertView **Repository Path**: noah37/uialert-view ## Basic Information - **Project Name**: UIAlertView - **Description**: 一个仿iOS alert组件创建的鸿蒙弹窗库。 - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-29 - **Last Updated**: 2024-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: HarmonyOS组件, HarmonyOS ## README # UIAlertView 一个仿iOS alert组件创建的鸿蒙弹窗库,已支持弹窗输入框样式,支持夜间模式。 ## Install `ohpm install @yung/uialertview` ## Usage ```` let controller = new UIAlertView('弹窗提示', '这是一个系统弹窗,仿iOS风格是吗', UIAlertControllerStyle.Alert, this) let confirmAction = new UIAlertAction('确定', UIAlertActionStyle.Destructive, (action) => { controller.close() }) let okAction = new UIAlertAction('知道了', UIAlertActionStyle.Default, (action) => { controller.close() }) let cancelAction = new UIAlertAction('取消', UIAlertActionStyle.Cancel, (action) => { controller.close() }) controller.addAction(confirmAction) // controller.addAction(okAction) controller.addAction(cancelAction) controller.show() ````