Table of Contents

Class Tooltip

Namespace
BootstrapBlazor.Components
Assembly
BootstrapBlazor.dll

Tooltip 组件

public class Tooltip : BootstrapModuleComponentBase, IComponent, IHandleAfterRender, IHandleEvent, IAsyncDisposable, ITooltip
Inheritance
Tooltip
Implements
Derived
Inherited Members
Extension Methods

Constructors

Tooltip()

public Tooltip()

Properties

ChildContent

获得/设置 子组件

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

ClassString

component class

protected string? ClassString { get; }

Property Value

string

CustomClass

获得/设置 自定义样式 默认 null

[Parameter]
public string? CustomClass { get; set; }

Property Value

string

Remarks

由 data-bs-custom-class 实现

CustomClassString

获得 CustomClass 字符串

protected virtual string? CustomClassString { get; }

Property Value

string

Delay

获得/设置 显示隐藏延时 默认 null

[Parameter]
public string? Delay { get; set; }

Property Value

string

FallbackPlacements

获得/设置 位置 默认为 null

[Parameter]
public string[]? FallbackPlacements { get; set; }

Property Value

string[]

FallbackPlacementsString

fallbackPlacements 参数

protected string? FallbackPlacementsString { get; }

Property Value

string

HtmlString

获得 是否 Html 字符串

protected string? HtmlString { get; }

Property Value

string

IsHtml

获得/设置 显示文字是否为 Html 默认为 false

[Parameter]
public bool IsHtml { get; set; }

Property Value

bool

Offset

获得/设置 偏移量 默认为 null

[Parameter]
public string? Offset { get; set; }

Property Value

string

Placement

获得/设置 位置 默认为 Placement.Top

[Parameter]
public Placement Placement { get; set; }

Property Value

Placement

PlacementString

弹窗位置字符串

protected string? PlacementString { get; }

Property Value

string

Sanitize

获得/设置 是否对 Title 进行关键字过滤 默认 true

[Parameter]
public bool Sanitize { get; set; }

Property Value

bool

SanitizeString

获得 是否关键字过滤字符串

protected string? SanitizeString { get; }

Property Value

string

Selector

获得/设置 元素选择器

[Parameter]
public string? Selector { get; set; }

Property Value

string

Title

获得/设置 显示内容

[Parameter]
public string? Title { get; set; }

Property Value

string

Trigger

获得/设置 触发方式 可组合 click focus hover 默认为 focus hover

[Parameter]
public string? Trigger { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnParametersSet()

protected override void OnParametersSet()

SetParameters(string, Placement, string?, string?, bool?, bool?, string?, string?, string?)

设置参数方法

public void SetParameters(string title, Placement placement = Placement.Auto, string? trigger = null, string? customClass = null, bool? isHtml = null, bool? sanitize = null, string? delay = null, string? selector = null, string? offset = null)

Parameters

title string
placement Placement
trigger string
customClass string
isHtml bool?
sanitize bool?
delay string
selector string
offset string