let year = new Date().getFullYear() ;
var PrefixZero = (num, n)=> {
return (Array(n).join(0) + num).slice(-n);
}
Array.apply(null, new Array(12)).map((item, index) => {
return { value: String(year)+PrefixZero((index+1),2), label: `${year}年${index + 1}月` };
});
var PrefixZero = (num, n)=> {
return (Array(n).join(0) + num).slice(-n);
}
Array.apply(null, new Array(12)).map((item, index) => {
return { value: String(year)+PrefixZero((index+1),2), label: `${year}年${index + 1}月` };
});