|
@@ -80,7 +80,17 @@ const handleClick = async ({ value }: { value: boolean }, todo: Todo) => {
|
|
const handleCalendarChange = async () => {
|
|
const handleCalendarChange = async () => {
|
|
await setData()
|
|
await setData()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+const formatter = (day: any) => {
|
|
|
|
+ let date = dayjs(new Date(day.date)).format('YYYY-MM-DD')
|
|
|
|
+ let list2 = list.value
|
|
|
|
+ for(const {executionTime} of list2) {
|
|
|
|
+ let date2 = dayjs(new Date(executionTime)).format('YYYY-MM-DD')
|
|
|
|
+ if (date === date2) {
|
|
|
|
+ day.bottomInfo = '⚫️'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return day
|
|
|
|
+}
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
await setData()
|
|
await setData()
|
|
await setList()
|
|
await setList()
|
|
@@ -88,17 +98,7 @@ onMounted(async () => {
|
|
</script>
|
|
</script>
|
|
<template>
|
|
<template>
|
|
<div class="flex-grow">
|
|
<div class="flex-grow">
|
|
- <wd-calendar-view v-model="current" @change="handleCalendarChange" :formatter="(day: any) => {
|
|
|
|
- let date = dayjs(new Date(day.date)).format('YYYY-MM-DD')
|
|
|
|
- console.log('--------', list)
|
|
|
|
- for(const {executionTime} of list) {
|
|
|
|
- let date2 = dayjs(new Date(executionTime)).format('YYYY-MM-DD')
|
|
|
|
- if (date === date2) {
|
|
|
|
- day.bottomInfo = '⏺'
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return day
|
|
|
|
- }" />
|
|
|
|
|
|
+ <wd-calendar-view v-model="current" @change="handleCalendarChange" :formatter="formatter" />
|
|
<wd-floating-panel v-if="!addSheetVisible" :anchors="[260, 490]" :custom-class="'h-auto'">
|
|
<wd-floating-panel v-if="!addSheetVisible" :anchors="[260, 490]" :custom-class="'h-auto'">
|
|
<div class="box-border p-4 flex flex-col gap-3.5">
|
|
<div class="box-border p-4 flex flex-col gap-3.5">
|
|
<div class="flex items-center gap-2.5">
|
|
<div class="flex items-center gap-2.5">
|