根据对象的某个属性值进行排序: 方法如下: arr.sort(this.objSort("key"))// 筛选的键名 objSort(key) { return (x, y) => { return x[key] - y[key];// 从小到大排序 } }