diff --git a/src/pages/index/components/calendar.vue b/src/pages/index/components/calendar.vue index 5bbe4fc1..5045575d 100644 --- a/src/pages/index/components/calendar.vue +++ b/src/pages/index/components/calendar.vue @@ -106,11 +106,13 @@ } return _arr }) - onMounted(() => { + const initDate = () => { nowDate.value = new Date() activeDate.value = formatDate(nowDate.value, 'yyyy-MM-dd') todayWeek.value = nowDate.value.getDay() - }) + } + defineExpose({ initDate }) + onMounted(() => {})