# Ellipsis 文本自动省略号

版本:1.14.0

开发:陈冠彬

# 安装

$ npm i @hui-pro/ellipsis -D
# 或者
$ yarn add @hui-pro/ellipsis --dev

# 引入

import ellipsis from '@hui-pro/ellipsis';
import '@hui-pro/ellipsis/theme/index.scss';
Vue.use(ellipsis);

# 指令形式

There were injuries alleged in three cases in 2015, and a 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.
指令形式
<span v-ellipsis>
  There were injuries alleged in three cases in 2015, and a 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.
</span>

# 控件形式

There were injuries alleged in three cases in 2015, and a 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.
控件形式
<h-ellipsis>
  There were injuries alleged in three cases in 2015, and a 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.
</h-ellipsis>

# API

# Attributes

参数 说明 类型 可选值 默认值
tag 文本标签,默认为 div,可以进行替换 String - div
clazz 标签的样式类,替代 class(目前无法同时使用 clazz 和 :clazz) String/Array/Object - -
block 设为 true,则文本样式设置为 display: 'block';(同 v-ellipsis 指令中的 block 修饰符) Boolean - false
non-full 设为 true,则文本样式设置为 width: 'auto'; max-width="100%";(同 v-ellipsis 指令中的 nonFull 修饰符) Boolean - false
title 文本过长出现省略号时的提示信息 String - -