diff --git a/src/views/task/calendar.vue b/src/views/task/calendar.vue index 5b02d7e..b1b57bf 100644 --- a/src/views/task/calendar.vue +++ b/src/views/task/calendar.vue @@ -44,17 +44,17 @@ const props = defineProps({ }, }); -const taskList = ref([]); -onUpdated(() => { - taskList.value = []; - props.list.forEach((item) => { - taskList.value.push({ +const taskList = computed(() => { + let arr: any = []; + props.list.forEach((item: any) => { + arr.push({ id: item.id, title: item.template_name, startDate: new Date(item.start_time), endDate: new Date(item.end_time), }); }); + return arr; }); const emits = defineEmits(["clickItem", "initShowDate"]);