mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
fix: 修复查看任务日志偶发性无法自动滚动底部的bug
This commit is contained in:
+5
-1
@@ -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}`);
|
||||
//如果在底部则滚动到底部
|
||||
|
||||
Reference in New Issue
Block a user