diff --git a/src/components/ToolBar.vue b/src/components/ToolBar.vue index 587b7a0..bdf7922 100644 --- a/src/components/ToolBar.vue +++ b/src/components/ToolBar.vue @@ -26,7 +26,9 @@ const props = defineProps({ }) const emit = defineEmits(['update:year']) -const filterYear = ref(stores.year) //ปีงบประมาณ +const filterYear = ref( + stores.year ? stores.year : new Date().getFullYear() +) //ปีงบประมาณ const titleName = ref('เพิ่มรายการลงเวลากรณีพิเศษ') //หัว popup const dateMonth = ref({ month: new Date().getMonth(), @@ -92,16 +94,18 @@ watch( :enableTimePicker="false" @update:modelValue="filterYearFn('year')" > - +