From ac3d70f44f36e324eb78aea4f6c219f470aec1a5 Mon Sep 17 00:00:00 2001 From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=8E=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/calendar/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/system/calendar/index.vue b/src/views/system/calendar/index.vue index 83be755..effe857 100644 --- a/src/views/system/calendar/index.vue +++ b/src/views/system/calendar/index.vue @@ -153,6 +153,7 @@ const formDataCaln = ref({ // const data = await CalendarApi.createCalendar(dda) // console.log(data) // } + //判断是否渲染当前日期更改组件 const isCurrentMonth = (date:any,index:number) => { const SelectDate = date.date; @@ -252,6 +253,7 @@ const submitForm = async (date:any)=> { // 关闭弹窗 updatedHoliday.visible = false; } + const closePopover = async (date:any)=> { // 判断更改是否符合 await getDate(date); @@ -260,6 +262,7 @@ const closePopover = async (date:any)=> { // 关闭弹窗 updatedHoliday.visible = false; } + // 获取日期时间 年月日 function formatDate2(dat: number|Date) { const date = new Date(dat) @@ -268,6 +271,7 @@ function formatDate2(dat: number|Date) { const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; } + //更具不同按钮传递不同的值 来处理展示的 年份 const selectDate = (val:number) => { if (!val){ @@ -275,15 +279,19 @@ const selectDate = (val:number) => { } currentYear.value += val } + //toYear Button change data go to year const toYear = () => { currentYear.value = new Date().getFullYear() } + //打开获取数据处理数据来渲染 onMounted( async ()=> { await getListDate() }) + +