({
date,
selected,
startDate,
endDate,
range
} = {})
| 2 | |
| 3 | class Calendar { |
| 4 | constructor({ |
| 5 | date, |
| 6 | selected, |
| 7 | startDate, |
| 8 | endDate, |
| 9 | range |
| 10 | } = {}) { |
| 11 | // 当前日期 |
| 12 | this.date = this.getDate(new Date()) // 当前初入日期 |
| 13 | // 打点信息 |
| 14 | this.selected = selected || []; |
| 15 | // 范围开始 |
| 16 | this.startDate = startDate |
| 17 | // 范围结束 |
| 18 | this.endDate = endDate |
| 19 | this.range = range |
| 20 | // 多选状态 |
| 21 | this.cleanMultipleStatus() |
| 22 | // 每周日期 |
| 23 | this.weeks = {} |
| 24 | // this._getWeek(this.date.fullDate) |
| 25 | } |
| 26 | /** |
| 27 | * 设置日期 |
| 28 | * @param {Object} date |
no test coverage detected