sortBykey(ary, key) {
return ary.sort(function (a, b) {
let x = a[key]
let y = b[key]
return ((x < y) ? -1 : (x > y) ? 1 : 0)
})
}
sortList(lists){ // lists传的是数组
return lists.sort((a, b) => {
return a['grapheme'].localeCompare(b['grapheme']) // grapheme为字母对应的属性名
})
}