vue-truncate-filter
A filter for VueJs to truncate string
78,257
56
| Install | |
|---|---|
npm install vue-truncate-filter |
|
| Latest Version: | 1.1.7 |
| License: | MIT |
| Last Updated: | Apr 22, 2018 |
| Links: | GitHub · npm |
Maintainer: imcvampire
vue-truncate-filter
A filter for Vuejs to truncate string
Install:
CommonJS
Available through npm as vue-truncate-filter: npm install vue-truncate-filter --save
var VueTruncate = require('vue-truncate-filter')
Vue.use(VueTruncate)
Direct include
- You can also directly include it with a
<script>tag when you have Vue already included globally. It will automatically install itself, and will add a globalVueTruncate.
Usage:
Vue 1.x
{{ text | truncate 100 '....' }}
Vue 2.x
{{ text | truncate(100) }}
Params:
-
length (Number): Text will be truncated if it's length is more than this param.
-
clamp (String) (default:
...): It will be added to end of text if it's truncated.
License
Related Packages
@opengis/filter
A flexible and extensible filter component system for Vue 3. Ideal for building...
10,212
0
Version History
| Version | Released | License |
|---|---|---|
| 1.1.7 | MIT | |
| 1.1.6 | MIT | |
| 1.1.5 | MIT | |
| 1.1.4 | MIT | |
| 1.1.3 | MIT | |
| 1.1.1 | MIT | |
| 1.1.0 | MIT | |
| 1.0.0 | MIT | |
| 0.1.6 | MIT | |
| 0.1.5 | MIT | |
| 0.1.4 | MIT | |
| 0.1.3 | MIT | |
| 0.1.2 | MIT | |
| 0.1.1 | MIT | |
| 0.1.0 | MIT |