下载npm i lodash
//数据二次处理 const monthGroup = useMemo(() => {//return 出去计算后的值return _.groupBy(billList, item => dayjs(item.date).format('YYYY-MM')) }, [billList])
拿到当前月份
//单日统计列表 const dayGroup = useMemo(() => {const group = _.groupBy(currentMonthList, (item) => dayjs(item.date).format('YYYY-MM-DD'))return {dayKeys: Object.keys(group),group} }, [currentMonthList]) console.log(dayGroup)