TipsDialogBuilder

open class TipsDialogBuilder(title: String = "提示", titleAlign: TextAlign = TextAlign.Center, content: String = "", contentAlign: TextAlign = TextAlign.Center, contentSlot: @Composable () -> Unit = {}, buttonText: String = "确定", type: TipsDialogBuilder.Type = Type.Default, onButtonClick: suspend CoroutineScope.() -> Boolean = { true }) : DialogBuilder

单按钮提示弹窗构建器 适用于仅需用户知晓并确认的通知类场景,提供标题、内容文本和一个确认按钮 支持通过 contentSlot 插入自定义内容代替或补充纯文字内容

Author

d10ng

Constructors

Link copied to clipboard
constructor(title: String = "提示", titleAlign: TextAlign = TextAlign.Center, content: String = "", contentAlign: TextAlign = TextAlign.Center, contentSlot: @Composable () -> Unit = {}, buttonText: String = "确定", type: TipsDialogBuilder.Type = Type.Default, onButtonClick: suspend CoroutineScope.() -> Boolean = { true })

Types

Link copied to clipboard
object Companion
Link copied to clipboard

弹窗主题类型,控制标题文字样式和按钮颜色

Properties

Link copied to clipboard

是否允许点击遮罩区域关闭弹窗,默认 false

Link copied to clipboard

弹窗内容在遮罩层内的对齐位置,默认居中 Alignment.Center

Functions

Link copied to clipboard
open override fun Build(id: String)

构建弹窗内容 子类在此函数中声明弹窗的 UI 结构