diff --git a/frontend/src/components/log/file/index.vue b/frontend/src/components/log/file/index.vue index d70259f4e..ca261a854 100644 --- a/frontend/src/components/log/file/index.vue +++ b/frontend/src/components/log/file/index.vue @@ -272,43 +272,20 @@ const getContent = async (pre: boolean) => { if (logs.value.length == 0) { logs.value = newLogs; - console.log('首次加载'); } else { - // if (end.value) { - // console.log('加载到底了'); - // if (pre) { - // console.log('向上拼接' + newLogs.length + '行'); - // } else { - // console.log('向下拼接' + newLogs.length + '行'); - // } - // logs.value = pre ? [...newLogs, ...logs.value] : [...lastLogs.value, ...newLogs]; - // } else { - // console.log('未加载到底'); - // if (pre) { - // console.log('向上拼接' + newLogs.length + '行'); - // } else { - // console.log('向下拼接' + newLogs.length + '行'); - // } - // logs.value = pre ? [...newLogs, ...logs.value] : [...lastLogs.value, ...newLogs]; - // } - // pre 向上拼接 if (pre) { logs.value = [...newLogs, ...logs.value]; } else { if (end.value) { - console.log('lastLogs 拼接'); logs.value = [...lastLogs.value, ...newLogs]; } else { logs.value = [...logs.value, ...newLogs]; } } } - console.log(logs.value.length); nextTick(() => { if (logContainer.value) { if (pre) { - console.log(logs.value[0]); - if (readReq.page > 1) { const addedLines = newLogs.length; const newScrollPosition = lastScrollTop.value + (addedLines * logHeight) / 3; @@ -326,7 +303,6 @@ const getContent = async (pre: boolean) => { logCount.value = logs.value.length; end.value = res.data.end; - console.log('end=' + end.value); emit('update:hasContent', logs.value.length > 0); if (readReq.latest) { readReq.page = res.data.total; @@ -339,7 +315,6 @@ const getContent = async (pre: boolean) => { } } if (logs.value && logs.value.length > 3000) { - console.log('日志过长,进行裁剪'); if (pre) { logs.value.splice(logs.value.length - readReq.pageSize, readReq.pageSize); if (maxPage.value > 1) {