0👍
✅
Are you using Underscore.js? If not you don’t have a _sortBy function available. You could just use the sort function. For ascending:
computed: {
byweight: function () {
return this.mices.sort((a,b)=>
{return a.weight - b.weight });
}
},
Source:stackexchange.com