# @icedesign/ellipsis

> 多行文字控制展示组件

Latest version **1.0.4** (published 2019-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @icedesign/ellipsis
pnpm add @icedesign/ellipsis
yarn add @icedesign/ellipsis
bun add @icedesign/ellipsis
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-05-22 |
| First published | 2018-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 716 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 231 |
| Maintainers | bindoon, chenbin93, chenjun1011, clarkxia, empireo, fenglai, jasonintju, lip966, noyobo, sobear, tao1991123, temper357, yuanyan, yujiangshui, yundong, zeroling |
| Keywords | ice, ice-component |

## Links

- npm: https://www.npmjs.com/package/@icedesign/ellipsis
- Repository: https://github.com/ice-lab/react-materials/tree/master/components/ellipsis
- Homepage: https://unpkg.com/@icedesign/ellipsis@1.0.4/build/index.html
- npm.io page: https://npm.io/package/@icedesign/ellipsis

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0
- [@alifd/next](https://npm.io/package/@alifd/next.md) ^1.x

## Recent versions

- 1.0.4 (latest) — 2019-05-22
- 1.0.0 (next) — 2019-01-09
- 0.1.7 — 2019-05-22
- 1.0.3 — 2019-03-04
- 1.0.2 — 2019-03-04
- 1.0.1 — 2019-02-25
- 0.1.6 — 2019-01-07
- 0.1.5 — 2018-11-20
- 0.1.4 — 2018-11-20
- 0.1.2 — 2018-03-07
- 0.1.1 — 2018-01-02
- 0.1.0 — 2018-01-02

## README

---
title: Ellipsis
category: Components
chinese: 多行文字控制
---

多行文字控制展示组件。

**注意：由于控制每行显示字符数需要获取宽度，因此当前组件外层包裹的元素必须是 div、p 等块级元素，如果包裹 a、span 等需要通过 CSS 控制外层元素为 `display: inline-block;` 或者 `display: block` 类型。如果你很难理解这句话，就直接用 div 包裹就对了。**

## 参数（props）

| 参数名 | 说明 | 必填 | 类型 | 默认值 | 可选值 | 备注 |
|-------|-----|-----|-----|-------|--------|-----|
| lineLimit | 限制文字只显示几行。 | false | number | 1 | 数字 | |
| text | 要处理的文字。 | true | string | '' | | |
| style | 内联的样式 | false | object | | | |
| className | 自定义的 className | false | string | '' | | |
| showTooltip | 是否显示 tooltip 信息，相比 title 提示性更强。 | false | boolean | false | | |

文字的最大宽度和外框的最大宽度一致，必须填写文本数据，不支持非文本、富文本数据。

---
_Source: https://npm.io/package/@icedesign/ellipsis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
