0.1.2 • Published 3 years ago

text-tooltip v0.1.2

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

text-tooltip

说明

text-tooltip是一个基于element-ui的tooltip组件封装的文本溢出省略,并启用tooltip悬浮提示的小组件,且可支持多行文本溢出隐藏。

通过NPM安装

npm i text-tooltip -S

引入组件

import 'text-tooltip'
import 'text-tooltip/dist/text-tooltip.css'

使用

<!-- 单行文本 -->
<TextTooltip
  :content="content"
/>
<!-- 多行文本 -->
<TextTooltip
  :content="content"
  :line="3"
/>

组件props属性

属性说明类型默认值
content文本内容String
line行数Number1
placement气泡框位置, 可选:top top-left top-right left left-top left-bottom right right-top right-bottom bottom bottom-left bottom-rightStringtop
popperClasstooltip的悬浮样式类String