fix: 修复查看任务日志偶发性无法自动滚动底部的bug

v2
xiaojunnuo 2025-01-19 23:13:30 +08:00
parent c085bac5d8
commit 7e482f798c
3 changed files with 13 additions and 2 deletions

View File

@ -126,6 +126,7 @@ instance.interceptors.response.use(null, async (error) => {
/* Wait and retry the request */
await new Promise((resolve) => { setTimeout(resolve, (retryAfter * 1000)); });
log(`Retrying request to URL ${config.url}`);
return instance(config);
}
}

View File

@ -46,7 +46,13 @@ export function createRemoteSelectInputDefine(opts?: {
const type = opts?.type || "plugin";
const watches = opts?.watches || [];
const helper = opts?.helper || "请选择";
const mode = opts?.mode || "tags";
let mode = "tags";
if (opts.multi === false) {
mode = undefined;
} else {
mode = opts?.mode ?? "tags";
}
const item = {
title,
component: {

View File

@ -89,7 +89,11 @@ export default {
return;
}
//
const isBottom = el ? el.scrollHeight - el.scrollTop === el.clientHeight : true;
let isBottom = true;
if (el) {
isBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 5;
console.log("isBottom", isBottom, el.scrollHeight, el.scrollTop, el.clientHeight);
}
await nextTick();
el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
//