文本缩略组件,支持多行缩略、自定义缩略符、尾字符过滤等。
基本使用
在需要省略的文本外包裹 iui-ellipsis
组件即可。
html
<iui-ellipsis>
This was long before digital audio: this was done with razor blades. Today,
it's called sampling, and the influence of these bands is felt in nearly all
branches of modern pop music.
</iui-ellipsis>
<iui-ellipsis>
This was long before digital audio: this was done with razor blades. Today,
it's called sampling, and the influence of these bands is felt in nearly all
branches of modern pop music.
</iui-ellipsis>
多行省略
通过 lines
属性可以设置文本的最大行数,超出行数的文本会被省略。
html
<iui-ellipsis :lines="2">
This was long before digital audio: this was done with razor blades. Today,
it's called sampling, and the influence of these bands is felt in nearly all
branches of modern pop music.
</iui-ellipsis>
<iui-ellipsis :lines="2">
This was long before digital audio: this was done with razor blades. Today,
it's called sampling, and the influence of these bands is felt in nearly all
branches of modern pop music.
</iui-ellipsis>
展开文本
通过 action
属性可以设置文本为可展开状态。
html
<iui-ellipsis :lines="2" action>
This was long before digital audio: this was done with razor blades. Today,
it's called sampling, and the influence of these bands is felt in nearly all
branches of modern pop music.
</iui-ellipsis>
<iui-ellipsis :lines="2" action>
This was long before digital audio: this was done with razor blades. Today,
it's called sampling, and the influence of these bands is felt in nearly all
branches of modern pop music.
</iui-ellipsis>
API
<Ellipsis>
props<Ellipsis>
events<Ellipsis>
slots