0👍
Rearraing your code like this. it will work
filters: {
formatStatus (value,self) {
let status = {
active: {
text: self.$t('general.successful'),
class: 'secondary--text'
},
processing: {
text: self.$t('general.processing'),
class: 'tertiary--text'
},
waiting: {
text: self.$t('general.pending'),
class: 'tertiary--text'
}
}
return status[value]
}
}
call filter like :
{{yourvalue | formatStatus(this)}}
- [Vuejs]-Is it possible to enque commits to send in batch insted of one by one in vuex?
- [Vuejs]-<noscript> error after deployment even if javascript is enabled
Source:stackexchange.com