1、数据排序
var arry = [9,5,6,7,5,6,3,1,0] arry.sort() // [0, 1, 3, 5, 5, 6, 6, 7, 9]
2、对象排序
var list=[{name:'张三',age:12},{name:'李四','age:23}]; list.sort((a,b)=>{ return a.age - b.age });//[{name:'李四','age:23},{name:'张三',age:12}]
标签:sort,vue,name,23,age,排序 From: https://www.cnblogs.com/AutumnSilence/p/17385647.html