Class SwalOption
- Namespace
- BootstrapBlazor.Components
- Assembly
- BootstrapBlazor.dll
SweetAlert Option 配置类
public class SwalOption : PopupOptionBase
- Inheritance
-
SwalOption
- Inherited Members
- Extension Methods
Constructors
SwalOption()
public SwalOption()
Properties
BodyTemplate
获得/设置 ModalBody 组件
public RenderFragment? BodyTemplate { get; set; }
Property Value
ButtonTemplate
获得/设置 按钮模板
public RenderFragment? ButtonTemplate { get; set; }
Property Value
CancelButtonText
获得/设置 取消按钮文字 默认为 取消
public string? CancelButtonText { get; set; }
Property Value
Category
获得/设置 提示类型 默认为 Success
public SwalCategory Category { get; set; }
Property Value
Class
获得/设置 弹窗自定义样式
public string? Class { get; set; }
Property Value
CloseButtonIcon
获得/设置 关闭按钮图标 默认 fa-solid fa-xmark
public string? CloseButtonIcon { get; set; }
Property Value
CloseButtonText
获得/设置 关闭按钮文字 默认为 关闭
public string? CloseButtonText { get; set; }
Property Value
ConfirmButtonIcon
获得/设置 确认按钮图标 默认 fa-solid fa-check
public string? ConfirmButtonIcon { get; set; }
Property Value
ConfirmButtonText
获得/设置 确认按钮文字 默认为 确认
public string? ConfirmButtonText { get; set; }
Property Value
FooterTemplate
获得/设置 Footer 组件
public RenderFragment? FooterTemplate { get; set; }
Property Value
IsConfirm
获得/设置 是否为确认弹窗模式 此属性给模态弹窗时使用 默认为 false
public bool IsConfirm { get; set; }
Property Value
OnCloseAsync
获得/设置 关闭弹窗回调方法
public Func<Task>? OnCloseAsync { get; set; }
Property Value
OnConfirmAsync
获得/设置 点击 Confirm 按钮回调方法 用于模态对话框
public Func<Task>? OnConfirmAsync { get; set; }
Property Value
ShowClose
获得/设置 是否显示关闭按钮 默认为 true 显示
public bool ShowClose { get; set; }
Property Value
ShowFooter
获得/设置 是否显示 Footer 默认 false 不显示
public bool ShowFooter { get; set; }
Property Value
Title
获得/设置 弹窗标题
public string? Title { get; set; }
Property Value
Methods
CloseAsync(bool)
关闭弹窗方法
public Task CloseAsync(bool returnValue = true)
Parameters
returnValue
bool模态弹窗返回值 默认为 true
Returns
ToAttributes()
将参数转换为组件属性方法
public Dictionary<string, object> ToAttributes()