Tooltip 文字提示
基础用法
使用 content
属性来决定 hover
时的提示信息。 由 placement
属性决定展示效果: placement
属性值为:[方向];四个方向:top
、left
、right
、bottom
。
更多内容的文字提示
使用 maxWidth
属性来决定 Tooltip
的自动换行宽度 。
API
Options
Name | Description | Type | Default | Version |
---|---|---|---|---|
content | 显示的内容,也可被 slot 覆盖 | string | ||
placement | Tooltip 组件出现的位置 | top-left |top | top-right | left | right | bottom-left | bottom | bottom-right | top | |
maxWidth | 最大宽度,内容超出则换行 | number | 500 | |
space | Tooltip 组件与出发内容的距离 | number | 8 |