Browse Source

日历优化

dev-map-local
dai 3 years ago
parent
commit
6ac6b290bc
  1. 15
      src/views/modules/communityParty/calendar/cpts/calendar.vue
  2. 1
      src/views/modules/communityParty/calendar/index.vue

15
src/views/modules/communityParty/calendar/cpts/calendar.vue

@ -120,6 +120,7 @@ export default {
watch: {
visibleCalendar() {
this.init();
// this.iniDate();
},
},
mounted() {
@ -134,13 +135,19 @@ export default {
init() {
if (!this.currentDate) {
this.handleClickDate(
this.visibleCalendar.find((item) => item.isToday) ||
this.visibleCalendar.filter((item) => item.thisMonth)[0]
);
this.iniDate();
}
},
iniDate() {
this.handleClickDate(
this.visibleCalendar
.filter((item) => item.thisMonth)
.find((item) => item.isToday) ||
this.visibleCalendar.filter((item) => item.thisMonth)[0]
);
},
handleClickDate(item) {
console.log("点击日历日期", item);
this.currentDate = item.format;

1
src/views/modules/communityParty/calendar/index.vue

@ -450,6 +450,7 @@ export default {
},
currentYear: function (val) {
console.log("watch--currentYear", val);
this.currentMonth = 0;
this.getMonthData();
},
},

Loading…
Cancel
Save