Skip to content

Commit 5732303

Browse files
committed
v1.4.2 - bugfix 更新子Task后无限创建的问题
1 parent 308a8d1 commit 5732303

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/components/TaskDrawer.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ const formData = reactive<Task>({
142142
timerStartTime: undefined, // 计时器开始时间
143143
timerEndTime: undefined, // 计时器结束时间
144144
timerElapsedTime: 0, // 计时器已用时间
145+
children: undefined, // 子任务列表
145146
})
146147
147148
// 任务列表数据
@@ -392,6 +393,7 @@ const resetForm = () => {
392393
timerStartTime: undefined,
393394
timerEndTime: undefined,
394395
timerElapsedTime: 0,
396+
children: undefined,
395397
})
396398
397399
// 清除错误信息

src/components/Timeline.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,6 @@ const getCachedTimelineData = (): unknown => {
729729
// 获取虚拟滚动优化后的时间轴数据
730730
const optimizedTimelineData = computed(() => {
731731
const cachedData = getCachedTimelineData() as any
732-
// TODO 测试后删除
733-
console.log('optimizedTimelineData - cachedData: ', cachedData)
734732
// 只在小时视图中应用虚拟滚动
735733
if (currentTimeScale.value === TimelineScale.HOUR && Array.isArray(cachedData)) {
736734
const { startHour, endHour } = visibleHourRange.value
@@ -776,8 +774,6 @@ const optimizedTimelineData = computed(() => {
776774
// 计算完整时间线的总宽度(用于虚拟滚动容器)
777775
const totalTimelineWidth = computed(() => {
778776
const cachedData = getCachedTimelineData() as any
779-
// TODO 测试后删除
780-
console.log('totalTimelineWidth - cachedData: ', cachedData)
781777
if (currentTimeScale.value === TimelineScale.HOUR) {
782778
if (Array.isArray(cachedData)) {
783779
// 计算总小时数
@@ -800,8 +796,6 @@ const totalTimelineWidth = computed(() => {
800796
const totalWeeks = cachedData.reduce((total, month: { weeks?: unknown[] }) => {
801797
return total + (month.weeks?.length || 0)
802798
}, 0)
803-
// TODO 测试后删除
804-
console.log('total weeks: ', totalWeeks)
805799
return totalWeeks * 60
806800
} else if (currentTimeScale.value === TimelineScale.MONTH) {
807801
return cachedData.length * 60

0 commit comments

Comments
 (0)