Commit b7a8340d by Lin

feat: 日期组件默认当前月上月处理

1 parent 2c0c6452
......@@ -184,11 +184,12 @@ const DateRangeStrategies = {
},
'月': {
// 初始化:当前月(1号到当前时间)
// 初始化:上一月(上一月的1号到上一月的最后一天)
init(now) {
const prevMonth = DateUtils.getPrevMonth(now);
return {
startDate: DateUtils.getMonthFirstDay(now),
endDate: new Date(now)
startDate: DateUtils.getMonthFirstDay(prevMonth),
endDate: DateUtils.getMonthLastDay(prevMonth)
};
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!