无人机管理后台前端(已迁走)
罗广辉
2025-08-28 a540610758222aec72bef216db32b120d57cacb8
style: 日历样式
1 files modified
20 ■■■■ changed files
src/views/wel/components/calendarBox.vue 20 ●●●● patch | view | raw | blame | history
src/views/wel/components/calendarBox.vue
@@ -74,14 +74,14 @@
const handleMonthChange = val => {
  const selectedMonth = new Date(val);
  currentMonth.value = selectedMonth;
  // 如果是当前月份,则选中当天;否则不选中
  if (isCurrentMonth(selectedMonth)) {
    selectedDate.value = new Date();
  } else {
    selectedDate.value = null;
  }
  // 强制更新日历视图
  nextTick(() => {
    updateCalendarSelection();
@@ -145,7 +145,7 @@
  if (isCurrentMonth(currentMonth.value) && selectedDate.value) {
    const currentDay = dayjs(selectedDate.value).date();
    const calendarCells = document.querySelectorAll('.el-calendar-table td');
    calendarCells.forEach(cell => {
      const day = parseInt(cell.querySelector('.date-number').textContent);
      if (day === currentDay) {
@@ -173,7 +173,7 @@
    nextTick(() => {
      updateCalendarSelection();
    });
    getJobEventBar();
  },
  { deep: true, immediate: true }
@@ -227,11 +227,11 @@
  } else {
    selectedDate.value = null;
  }
  nextTick(() => {
    updateCalendarSelection();
  });
  getJobEventBar();
});
</script>
@@ -331,16 +331,16 @@
      font-size: 14px;
      color: #363636;
    }
 &.five-rows .el-calendar-table .el-calendar-day {
    height: pxToVh(92) !important;
  }
  &.six-rows .el-calendar-table .el-calendar-day {
    height: pxToVh(78) !important;
  }
    // 选中日期样式
    .el-calendar-table td.is-selected {
    .el-calendar-table td.is-selected.is-today {
      .el-calendar-day {
        outline: 2px solid #409eff;
        outline-offset: -2px;
@@ -354,7 +354,7 @@
    .el-calendar-table td.is-selected {
      background-color: transparent;
    }
  }
  .event-item {