Skip to content

Commit 291f3f3

Browse files
committed
Merge branch 'master' of github.com:imcvampire/vue-truncate-filter
2 parents 2209237 + c8f8122 commit 291f3f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# vue-truncate-filter
22

3+
[![Greenkeeper badge](https://badges.greenkeeper.io/imcvampire/vue-truncate-filter.svg)](https://greenkeeper.io/)
4+
35
A filter for Vuejs to truncate string
46

57
## Install:
@@ -19,10 +21,14 @@ A filter for Vuejs to truncate string
1921

2022
## Usage:
2123

24+
### Vue 1.x
2225
```html
2326
{{ text | truncate 100 '....' }}
2427
```
25-
28+
### Vue 2.x
29+
```html
30+
{{ text | truncate(100) }}
31+
```
2632
## Params:
2733
- length (Number): Text will be truncated if it's length is more than this param.
2834

0 commit comments

Comments
 (0)