This commit is contained in:
lcw
2025-12-05 21:36:34 +08:00
parent 64ab9fc44c
commit b39387c4ed
97 changed files with 3342 additions and 298 deletions

View File

@ -72,7 +72,7 @@
<script setup>
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import { ref, computed, onMounted } from "vue";
import { ref, computed, onMounted ,watch} from "vue";
import { Solar, HolidayUtil } from 'lunar-javascript'
import { timeValidate } from "@/utils/tools";
import { ElMessage, ElMessageBox } from 'element-plus';
@ -142,7 +142,7 @@ const getAllFestivals = (date) => {
name: festival,
})
})
console.log(result)
return result
}
const selectedYear = ref();
@ -315,7 +315,15 @@ const gettingData = () => {
})
}
// 监听currentDate变化同步更新下拉选择器的值
watch(currentDate, (newDate) => {
const year = timeValidate(newDate, 'yd')
const month = timeValidate(newDate, 'ym')
selectedYear.value = parseFloat(year)
selectedMonth.value = parseFloat(month) - 1
dateVal.value = timeValidate(newDate, 'ymd')
gettingData()
})
</script>
@ -483,7 +491,6 @@ const gettingData = () => {
/* 调休上班样式 - 红底白字 */
.holiday-work {
background-color: red;
color: white;
}