PHP中文网2017-05-16 17:07:33
The code is really ugly. Don’t you know how to use a filter or function?
var wordMap = ['待发车', ...]
// vue 里面
filters: {
words: function (status) {
return wordMap[status]
}
}
// template 里面
<span>{{ item.status | words }}</span>