base-ui
Version:
A component library for Better Vue developmemt
22 lines (21 loc) • 612 B
JavaScript
/*
* @Author: pengmeng@yangqianguan.com
* @Date: 2019-08-22 11:16:43
* @Last Modified by: pengmeng@yangqianguan.com
* @Last Modified time: 2019-08-22 11:16:43
*/
export const changeOption = {
'prev-month': (time) => {
const temTime = new Date(time);
const month = temTime.getMonth();
temTime.setMonth(month - 1);
return temTime.getTime();
},
'today': () => Date.now(),
'next-month': (time) => {
const temTime = new Date(time);
const month = temTime.getMonth();
temTime.setMonth(month + 1);
return temTime.getTime();
}
};