lcw
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user