|
@@ -223,8 +223,8 @@ export default {
|
|
},
|
|
},
|
|
// 设置横向的天数
|
|
// 设置横向的天数
|
|
setDay(node) {
|
|
setDay(node) {
|
|
- this.days = []
|
|
|
|
if (node.year) {
|
|
if (node.year) {
|
|
|
|
+ this.days = []
|
|
// 计算是平年还是闰年
|
|
// 计算是平年还是闰年
|
|
let dayLength = 31
|
|
let dayLength = 31
|
|
if ((node.year % 4 === 0 && node.year % 100 !== 0) || node.year % 400 === 0) {
|
|
if ((node.year % 4 === 0 && node.year % 100 !== 0) || node.year % 400 === 0) {
|
|
@@ -248,9 +248,9 @@ export default {
|
|
for (let index = 1; index <= dayLength; index++) {
|
|
for (let index = 1; index <= dayLength; index++) {
|
|
this.days.push({ id: index, date: node.year + '-' + node.month + '-' + index })
|
|
this.days.push({ id: index, date: node.year + '-' + node.month + '-' + index })
|
|
}
|
|
}
|
|
|
|
+ // 默认选中当前月的第一天
|
|
|
|
+ this.choiceDay(0)
|
|
}
|
|
}
|
|
- // 默认选中当前月的第一天
|
|
|
|
- this.choiceDay(0)
|
|
|
|
},
|
|
},
|
|
// 设置tree组件节点
|
|
// 设置tree组件节点
|
|
setYearMonth() {
|
|
setYearMonth() {
|