LpTooltip 文字提示组件
用于鼠标移入时显示的文字提示
安装
项目根目录下
npm i @leophen/lp-tooltip
main 文件下
import LpTooltip from '@leophen/lp-tooltip.vue'
Vue.component(Tooltip.name, Tooltip)
使用
<LpTooltip
content="文字提示"
theme="light"
position="bottom"
:enterable="true"
transition="ease-in-out"
>
<button>我是一个按钮</button>
</LpTooltip>
API
Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
content | 提示内容 | String | - | 提示内容 |
theme | 提示主题 | String | light / dark | light |
position | 提示的位置 | String | top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-star t /left-end / right / right-start / right-end | bottom |
enterable | 鼠标是否可移入提示框 | Boolean | true / false | false |
transition | 提示动画效果 | String | ease / ease-in / ease-out / ease-in-out / 贝塞尔曲线 | ease-in-out |