Skip to content

Commit

Permalink
fix terminal on page refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Jul 11, 2024
1 parent 8da1804 commit 5bb55e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vitepress/theme/components/Terminal/Terminal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default defineComponent({
nextId: undefined,
}
},
mounted() {
this.nextId = undefined
},
methods: {
scrollToNewLine(line) {
if (line.id === 'reset') {
Expand Down Expand Up @@ -58,6 +61,7 @@ export default defineComponent({
<div class="group mt-10 lg:ml-12 lg:mt-8 relative h-[250px] lg:max-w-[600px] lg:h-[350px] overflow-hidden rounded-xl">
<VTermynal
class="AnimatedTerminal"
:lazy="true"
@before-new-line="scrollToNewLine($event)"
@restart="scrollToTop()"
>
Expand Down

0 comments on commit 5bb55e3

Please sign in to comment.