Browse Source

日历优化

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

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

@ -120,6 +120,7 @@ export default {
watch: { watch: {
visibleCalendar() { visibleCalendar() {
this.init(); this.init();
// this.iniDate();
}, },
}, },
mounted() { mounted() {
@ -134,11 +135,17 @@ export default {
init() { init() {
if (!this.currentDate) { if (!this.currentDate) {
this.iniDate();
}
},
iniDate() {
this.handleClickDate( this.handleClickDate(
this.visibleCalendar.find((item) => item.isToday) || this.visibleCalendar
.filter((item) => item.thisMonth)
.find((item) => item.isToday) ||
this.visibleCalendar.filter((item) => item.thisMonth)[0] this.visibleCalendar.filter((item) => item.thisMonth)[0]
); );
}
}, },
handleClickDate(item) { handleClickDate(item) {

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

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

Loading…
Cancel
Save