<a-range-picker
:ranges="{
'今天': [moment(), moment()],
'昨天': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'最近7天': [moment().subtract(6, 'days'), moment()],
'最近30天': [moment().subtract(29, 'days'), moment()],
'这个月': [moment().startOf('month'), moment()],
'上个月': [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')],
}"
@change="onChange"
/>
moment 获取相对时间
最新推荐文章于 2024-06-13 14:10:10 发布