📅  最后修改于: 2022-03-11 14:48:15.979000             🧑  作者: Mango
interface ArrayConstructor {
sortAlphaNumeric: (data: Array) => Array;
};
Array.sortAlphaNumeric = function (data): Array {
return data.sort((a, b) => {
return a.AreaName.toLowerCase().localeCompare(b.AreaName.toLowerCase(), undefined, {
numeric: true,
sensitivity: 'base'
});
});
}