src/sfc/TimeSelect.vue
@@ -34,7 +34,7 @@ methods:{ initOneWeekAgoTime(){ // 给时间选择器设置默认时间为一周前 this.time[0] = dayjs().subtract(1, 'week').format('YYYY-MM-DD HH:mm:ss'); this.time[0] = dayjs().subtract(4, 'week').format('YYYY-MM-DD HH:mm:ss'); this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss'); } }