code: function getMonthsByYear({ minDate, maxDate, year }) {
    const max = new Date(maxDate);
    const min = new Date(minDate);
    const maxYear = max.getFullYear();
    const minYear = min.getFullYear();
    let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((item, index) => ({
      text: index + 1,
      value: index,
    }));
    if (year > minYear && year < maxYear) {
      return arr;
    }
    const maxTime = max.getTime();
    const minTime = min.getTime();
    if (year === maxYear) {
      arr = arr.filter((item) => {
        const date = new Date(year, item.value, 1);
        return date.getTime() < maxTime;
      });
    }
    if (year === minYear) {
      arr = arr.filter((item) => {
        const date = new Date(year, item.value + 1, 0);
        return date.getTime() > minTime;
      });
    }
    return arr;
  }
docs: 计算时间范围类的月份，根据年
  @param { String | Number} minDate
  @param { String | Number } maxDate
  @param { Number } year
  @returns year<array>