mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 19:05:55 +02:00
fix: log container not scroll to bottom
This commit is contained in:
parent
4bce9025af
commit
04bf6d78d4
1 changed files with 7 additions and 6 deletions
|
@ -23,7 +23,7 @@ const control = reactive({
|
||||||
type: logType(),
|
type: logType(),
|
||||||
conf_name: route.query.conf_name,
|
conf_name: route.query.conf_name,
|
||||||
server_idx: parseInt(route.query.server_idx as string),
|
server_idx: parseInt(route.query.server_idx as string),
|
||||||
directive_idx: parseInt(route.query.directive_idx as string),
|
directive_idx: parseInt(route.query.directive_idx as string)
|
||||||
})
|
})
|
||||||
|
|
||||||
function openWs() {
|
function openWs() {
|
||||||
|
@ -51,11 +51,12 @@ function addLog(data: string, prepend: boolean = false) {
|
||||||
} else {
|
} else {
|
||||||
buffer.value += data
|
buffer.value += data
|
||||||
}
|
}
|
||||||
|
nextTick(() => {
|
||||||
const elem = (logContainer.value as any as Element)
|
const elem = (logContainer.value as any as Element)
|
||||||
elem.scroll({
|
elem?.scroll({
|
||||||
top: elem.scrollHeight,
|
top: elem.scrollHeight,
|
||||||
left: 0,
|
left: 0
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue