1.0.1 • Published 2 years ago
text-overflow-render v1.0.1
text-overflow
文本超出一定长度显示展开和收缩效果
Author
zhangyj 708819251@qq.com
下载模块
npm i text-overflow
使用方式
单个引入
import textOverflow from 'text-overflow'
全局引入
import textOverflow from 'text-overflow'
Vue.use(textOverflow);
<textOverflow :textData="str" :textLength="10"></textOverflow>
str:'测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本'
直接引入js
<script src="text-overflow.min.js"></script>
<textOverflow :textData="str" :textLength="10"></textOverflow>
str:'测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本'