export function changeDate(data1: any, data2: any) { console.log(1111) var start = new Date(data1) var end = new Date(data2) var count = end.getDate() - start.getDate() + 1 let arr = [] for (var i = 0; i < count; i++) { arr.push(`${start.getFullYear()}/ ${start.getMonth() + 1}/${start.getDate() + i}`) } return arr }
输入2022-01-01 2022-01-30
[2022-01-01....2022-01-30]