赵添更 2 hónapja
szülő
commit
e1e3451d4b
1 módosított fájl, 12 hozzáadás és 12 törlés
  1. 12 12
      packages/merchant/src/pages/agent/todo/index.vue

+ 12 - 12
packages/merchant/src/pages/agent/todo/index.vue

@@ -80,7 +80,17 @@ const handleClick = async ({ value }: { value: boolean }, todo: Todo) => {
 const handleCalendarChange = async () => {
   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 () => {
   await setData()
   await setList()
@@ -88,17 +98,7 @@ onMounted(async () => {
 </script>
 <template>
   <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'">
       <div class="box-border p-4 flex flex-col gap-3.5">
         <div class="flex items-center gap-2.5">