Table of Contents

Class DialogOption

Namespace
BootstrapBlazor.Components
Assembly
BootstrapBlazor.dll

Dialog 组件配置类

public class DialogOption
Inheritance
DialogOption
Derived
Inherited Members
Extension Methods

Constructors

DialogOption()

public DialogOption()

Properties

BodyContext

获得/设置 相关连数据,多用于传值使用

public object? BodyContext { get; set; }

Property Value

object

BodyTemplate

获得/设置 ModalBody 组件

public RenderFragment? BodyTemplate { get; set; }

Property Value

RenderFragment

Class

获得/设置 弹窗自定义样式

public string? Class { get; set; }

Property Value

string

CloseButtonIcon

获得/设置 关闭按钮图标 默认 null 使用当前主题图标

public string? CloseButtonIcon { get; set; }

Property Value

string

CloseButtonText

获得/设置 关闭按钮文本

public string? CloseButtonText { get; set; }

Property Value

string

Component

获得/设置 自定义组件

public BootstrapDynamicComponent? Component { get; set; }

Property Value

BootstrapDynamicComponent

ExportPdfButtonOptions

获得/设置 导出 Pdf 按钮配置项

public ExportPdfButtonOptions? ExportPdfButtonOptions { get; set; }

Property Value

ExportPdfButtonOptions

FooterTemplate

获得/设置 ModalFooter 组件

public RenderFragment? FooterTemplate { get; set; }

Property Value

RenderFragment

FullScreenSize

获得/设置 全屏弹窗 默认 None

public FullScreenSize FullScreenSize { get; set; }

Property Value

FullScreenSize

HeaderTemplate

获得/设置 ModalHeader 组件模板

public RenderFragment? HeaderTemplate { get; set; }

Property Value

RenderFragment

HeaderToolbarTemplate

获得/设置 ModalHeader 组件自定义按钮

public RenderFragment? HeaderToolbarTemplate { get; set; }

Property Value

RenderFragment

IsAutoCloseAfterSave

获得/设置 保存成功后是否自动关闭弹窗 默认 true 自动关闭

public bool IsAutoCloseAfterSave { get; set; }

Property Value

bool

IsBackdrop

获得/设置 是否支持点击遮罩关闭弹窗 默认 false

public bool IsBackdrop { get; set; }

Property Value

bool

IsCentered

获得/设置 是否垂直居中 默认为 true

public bool IsCentered { get; set; }

Property Value

bool

IsDraggable

获得/设置 是否可以拖拽弹窗 默认 false 不可以拖动

public bool IsDraggable { get; set; }

Property Value

bool

IsKeyboard

获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 true 支持

public bool IsKeyboard { get; set; }

Property Value

bool

IsScrolling

获得/设置 是否弹窗正文超长时滚动 默认为 false

public bool IsScrolling { get; set; }

Property Value

bool

OnCloseAsync

获得/设置 关闭弹窗回调方法

public Func<Task>? OnCloseAsync { get; set; }

Property Value

Func<Task>

OnSaveAsync

获得/设置 保存按钮回调方法

public Func<Task<bool>>? OnSaveAsync { get; set; }

Property Value

Func<Task<bool>>

OnShownAsync

获得/设置 弹窗已显示时回调此方法

public Func<Task>? OnShownAsync { get; set; }

Property Value

Func<Task>

PrintButtonText

获得/设置 Header 中打印按钮显示文字 默认为资源文件中 打印

public string? PrintButtonText { get; set; }

Property Value

string

SaveButtonIcon

获得/设置 保存按钮图标 默认 null 使用当前主题图标

public string? SaveButtonIcon { get; set; }

Property Value

string

SaveButtonText

获得/设置 保存按钮文本

public string? SaveButtonText { get; set; }

Property Value

string

ShowCloseButton

获得/设置 是否显示关闭按钮 默认为 true

public bool ShowCloseButton { get; set; }

Property Value

bool

ShowExportPdfButton

获得/设置 是否显示导出 Pdf 按钮 默认为 false 不显示

public bool ShowExportPdfButton { get; set; }

Property Value

bool

ShowExportPdfButtonInHeader

获得/设置 Header 中是否显示导出 Pdf 按钮 默认 false 不显示

public bool ShowExportPdfButtonInHeader { get; set; }

Property Value

bool

ShowFooter

获得/设置 是否显示 Footer 默认为 true

public bool ShowFooter { get; set; }

Property Value

bool

ShowHeaderCloseButton

获得/设置 是否显示 Header 关闭按钮 默认为 true

public bool ShowHeaderCloseButton { get; set; }

Property Value

bool

ShowMaximizeButton

获得/设置 是否显示最大化按钮 默认 false 不显示

public bool ShowMaximizeButton { get; set; }

Property Value

bool

ShowPrintButton

获得/设置 是否显示打印按钮 默认 false 不显示

public bool ShowPrintButton { get; set; }

Property Value

bool

ShowPrintButtonInHeader

获得/设置 打印按钮是否显示在 Header 中 默认 false 不显示

public bool ShowPrintButtonInHeader { get; set; }

Property Value

bool

ShowResize

获得/设置 是否显示调整大小按钮 默认为 false

public bool ShowResize { get; set; }

Property Value

bool

ShowSaveButton

获得/设置 是否显示保存按钮 默认 false 不显示

public bool ShowSaveButton { get; set; }

Property Value

bool

Size

获得/设置 弹窗大小

public Size Size { get; set; }

Property Value

Size

Title

获得/设置 弹窗标题

public string? Title { get; set; }

Property Value

string

Methods

CloseDialogAsync()

关闭弹窗方法

public Task CloseDialogAsync()

Returns

Task

ToAttributes()

将参数转换为组件属性方法

public Dictionary<string, object> ToAttributes()

Returns

Dictionary<string, object>