1.0.5 • Published 4 years ago

v-line-clamp v1.0.5

Weekly downloads
5
License
Apache License 2....
Repository
-
Last release
4 years ago

When a word exceeds the specified number of lines, an ellipsis appears

中文文档

usage

1.add to you project

npm i v-line-clamp
// or
yarn add v-line-clamp

2.in the main.js

import LineClamp from 'v-line-clamp';

Vue.use(LineClamp)

3.now you can use it in the template

<!-- By default, an ellipsis appears on one line -->
<div v-line-clamp></div>
<!-- And you can set a few lines to show the ellipsis -->
<div v-line-clamp="3"></div>

Maybe you want to use it directly on components,and You can do this

import { lineClamp } from 'v-line-clamp'

.....
    directives: {
        lineClamp
    }
....

Problems prone

maybe you should set it up display: inline-block or display: block

1.0.2

4 years ago

1.0.1

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago