inleft
2022-02-09 9bcb19959eeb9da9bde2561e7278f6d0a55eb151
commit | author | age
9bcb19 1 # Ellipsis 文本自动省略号
I 2
3 文本过长自动处理省略号,支持按照文本长度和最大行数两种方式截取。
4
5
6
7 引用方式:
8
9 ```javascript
10 import Ellipsis from '@/components/Ellipsis'
11
12 export default {
13     components: {
14         Ellipsis
15     }
16 }
17 ```
18
19
20
21 ## 代码演示  [demo](https://pro.loacg.com/test/home)
22
23 ```html
24 <ellipsis :length="100" tooltip>
25         There were injuries alleged in three cases in 2015, and a
26         fourth incident in September, according to the safety recall report. After meeting with US regulators in October, the firm decided to issue a voluntary recall.
27 </ellipsis>
28 ```
29
30
31
32 ## API
33
34
35 参数 | 说明 | 类型 | 默认值
36 ----|------|-----|------
37 tooltip | 移动到文本展示完整内容的提示 | boolean | -
38 length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | -