diff --git a/src/components/common/log-drawer.vue b/src/components/common/log-drawer.vue
index bc22ce3..6bfc61b 100644
--- a/src/components/common/log-drawer.vue
+++ b/src/components/common/log-drawer.vue
@@ -256,6 +256,9 @@ watch(
const data = JSON.parse(e.data) as Api.JobLog.JobMessage;
data.key = `${data.time_stamp}-${generateRandomString(16)}`;
logList.value.push(data);
+ nextTick(() => {
+ if (isAutoScroll.value) virtualListInst.value?.scrollTo({ position: 'bottom', debounce: true });
+ });
} else {
finished.value = true;
stopLogByWs();
@@ -268,7 +271,8 @@ watch(
await getLogList();
}
- }
+ },
+ { immediate: true }
);
function timestampToDate(timestamp: string): string {
@@ -489,7 +493,13 @@ const SnailLogComponent = defineComponent({
日志正在加载
{{ title }}
-
+
@@ -507,6 +517,14 @@ const SnailLogComponent = defineComponent({
+