let process = [{label:'公告开始时间',time:'2022-04-26 14:29:38'},
{label:'时间1',time:'2022-04-29 00:00:00'},
{label:'时间2',time:'2022-04-30 14:29:38'},
{label:'时间3',time:'2022-04-28 00:00:00'},
{label:'结束时间4',time:'2022-04-29 14:29:38'}]
process = process.sort(function(a, b) {
return new Date(a.time).getTime()- new Date(b.time).getTime()
})
console.log(process);
06-25
709
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-06
2993
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-09