Is there any improvement in the above code?
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>
The code is really ugly. Don’t you know how to use a filter or function?