Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
João Cavalcante committed May 10, 2017
1 parent c1bbe55 commit e577b18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-truncate-collapsed",
"version": "1.1.0",
"version": "1.1.1",
"description": "A simple component that truncates your text and adds a 'Read More/Show Less' clickable.",
"main": "truncate.vue",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions truncate.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<p>
<span v-if="!show">{{truncate(text)}} <a v-if="text.length <= length" @click="toggle()">{{clamp || 'Read More'}}</a></span>
<span v-if="show">{{text}} <a @click="toggle()" v-if="text.length <= length">{{less || 'Show Less'}}</a></span>
<span v-if="!show">{{truncate(text)}} <a v-if="text.length => length" @click="toggle()">{{clamp || 'Read More'}}</a></span>
<span v-if="show">{{text}} <a @click="toggle()" v-if="text.length => length">{{less || 'Show Less'}}</a></span>
</p>
</template>

Expand Down

0 comments on commit e577b18

Please sign in to comment.