文字气泡 Tooltip
鼠标移入,气泡出现,鼠标移出,气泡消失。
自定义背景颜色
Section titled “自定义背景颜色”通过 background-color 属性自定义背景颜色。
适用于小场景或数字气泡样式。
文字气泡支持 12 个不同的方位。分别为:上左、上、上右、下左、下、下右、左上、左、左下、右上、右、右下。
<tooltip> 组件继承 <trigger> 组件的全部属性
<tooltip> Props
Section titled “<tooltip> Props”| 参数名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| popup-visible (v-model) | 文字气泡是否可见 | boolean | - |
| default-popup-visible | 文字气泡默认是否可见(非受控模式) | boolean | false |
| disabled | 文字气泡是否禁用 | boolean | false |
| content | 文字气泡内容 | string | - |
| position | 弹出位置 | 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb' | 'top' |
| mini | 是否展示为迷你尺寸 | boolean | false |
| background-color | 弹出框的背景颜色 | string | - |
| content-class | 弹出框内容的类名 | ClassName | - |
| content-style | 弹出框内容的样式 | CSSProperties | - |
| arrow-class | 弹出框箭头的类名 | ClassName | - |
| arrow-style | 弹出框箭头的样式 | CSSProperties | - |
| popup-container | 弹出框的挂载容器 | string | HTMLElement | - |
<tooltip> Events
Section titled “<tooltip> Events”| 事件名 | 描述 | 参数 |
|---|---|---|
| popup-visible-change | 文字气泡显示状态改变时触发 | visible: boolean |
<tooltip> Slots
Section titled “<tooltip> Slots”| 插槽名 | 描述 | 参数 |
|---|---|---|
| content | 内容 | - |