Closed 1c7 closed 6 years ago
Do you have any idea how to handle mandarin characters?
@imcvampire I just wrote this, it work well
Vue.filter('truncate', function (value, length) {
if (!value) return ''
value = value.toString()
if(value.length > length){
return value.substring(0, length) + "..."
}else{
return value
}
})
you can close this issue anytime
😄
I think I should just close it
Example
Issue
clearly it's implement by
split(' ')
split by empty space doesn't work with ChineseSo
This is more of a "just letting you know", not asking you to change it.
Still thanks you for build this.