code: function getDaysByMonth({
    minDate, maxDate, year, month,
  }) {
    const max = new Date(maxDate);
    const min = new Date(minDate);
    const maxYear = max.getFullYear();
    const minYear = min.getFullYear();
    const NUM = getMonthDays(year, month + 1);
    let arr = [];
    for (let i = 1; i <= NUM; i++) {
      arr.push({
        text: i,
        value: i,
      });
    }
    if (year > minYear && year < maxYear) {
      return arr;
    }
    const maxTime = max.getTime();
    const minTime = min.getTime();
    if (year === minYear) {
      arr = arr.filter((item) => {
        const date = new Date(year, month, item.value);
        return date.getTime() > minTime;
      });
    }
    if (year === maxYear) {
      arr = arr.filter((item) => {
        const date = new Date(year, month, item.value);
        return date.getTime() < maxTime;
      });
    }
    return arr;
  }
docs: 根据年月，在最大、最小日期范围内，计算当月天数
  @param minDate { Number|String } 最小日期
  @param maxDate { Number|String } 最大日期
  @param year { Number } 当前年
  @param month { Number } 当前月
  @returns days<array>