mirror of https://github.com/certd/certd
fix: 修复查看任务日志偶发性无法自动滚动底部的bug
parent
c085bac5d8
commit
7e482f798c
|
@ -126,6 +126,7 @@ instance.interceptors.response.use(null, async (error) => {
|
||||||
|
|
||||||
/* Wait and retry the request */
|
/* Wait and retry the request */
|
||||||
await new Promise((resolve) => { setTimeout(resolve, (retryAfter * 1000)); });
|
await new Promise((resolve) => { setTimeout(resolve, (retryAfter * 1000)); });
|
||||||
|
log(`Retrying request to URL ${config.url}`);
|
||||||
return instance(config);
|
return instance(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,13 @@ export function createRemoteSelectInputDefine(opts?: {
|
||||||
const type = opts?.type || "plugin";
|
const type = opts?.type || "plugin";
|
||||||
const watches = opts?.watches || [];
|
const watches = opts?.watches || [];
|
||||||
const helper = opts?.helper || "请选择";
|
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 = {
|
const item = {
|
||||||
title,
|
title,
|
||||||
component: {
|
component: {
|
||||||
|
|
|
@ -89,7 +89,11 @@ export default {
|
||||||
return;
|
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();
|
await nextTick();
|
||||||
el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
|
el = document.querySelector(`.pi-task-view-logs.id-${node.node.id}`);
|
||||||
//如果在底部则滚动到底部
|
//如果在底部则滚动到底部
|
||||||
|
|
Loading…
Reference in New Issue