Skip to content

FToolTip 组件

默认使用

FToolTip 组件用于显示工具提示。可以通过 content 属性定义提示内容,position属性定义提示框位置。

触发方式

组件默认触发方式为 hover,可以通过 trigger 属性设置触发方式为 click

样式定制

通过 mode 属性设置组件样式,默认为浅色模式,mode属性为dark时为黑色主题模式,mode属性为light时为浅色主题模式, mode 属性值为 custom 时,可以通过 modeTextColormodeBgColor 属性设置自定义文本颜色和背景颜色。

TIP

注意:mode 属性值为 custom 时,modeTextColormodeBgColor 属性为若为空时,默认为浅色主题的文本颜色和背景颜色。

自定义内容宽度

内容默认没有宽度,可以无限扩大,可以通过 maxWidth 属性设置组件内容显示的最大宽度。

Props

属性说明类型可选值默认值
content提示内容string
mode模式stringdarklightcustomlight
modeTextColor自定义文本颜色string#000
modeBgColor自定义背景颜色string#fff
position提示框位置stringtoptop-starttop-endbottombottom-startbottom-endleftleft-startleft-endrightright-startright-endleft
trigger触发方式stringhoverclickhover
offset偏移量number2
zIndexz-indexnumber1001
maxWidth最大宽度numbernone

Released under the MIT License.