mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-05 06:04:35 +08:00
feat: remove console
This commit is contained in:
parent
acbb151b15
commit
ac2700f965
1 changed files with 0 additions and 25 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue