Scroll to the bottom when status messages appear
The log viewer was scrolling to the bottom when new logs appeared, but not when the status updated. This meant that the status update may have been invisible. I now scroll when the status changes too, which should fix the problem.
This commit is contained in:
parent
46444770f3
commit
29177d7214
1 changed files with 9 additions and 0 deletions
|
|
@ -34,6 +34,15 @@ export default {
|
|||
|
||||
watch: {
|
||||
log: function() {
|
||||
this.scrollToBottom();
|
||||
},
|
||||
taskStatus: function() {
|
||||
this.scrollToBottom();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
scrollToBottom() {
|
||||
this.$nextTick(function() {
|
||||
let viewer = this.$refs.logContainer;
|
||||
viewer.scrollTop = viewer.scrollHeight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue