Skip to content

Commit

Permalink
fix: add cli fit the window when resize
Browse files Browse the repository at this point in the history
  • Loading branch information
tiny-craft committed Oct 31, 2023
1 parent ca8403d commit 5a29a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/content_value/ContentCli.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ onMounted(() => {
const { term, fitAddon } = newTerm()
termInst = term
fitAddonInst = fitAddon
// window.addEventListener('resize', resizeTerm)
window.addEventListener('resize', resizeTerm)
term.writeln('\r\n' + i18nGlobal.t('interface.cli_welcome'))
// term.write('\x1b[4h') // insert mode
Expand All @@ -71,7 +71,7 @@ onMounted(() => {
})
onUnmounted(() => {
// window.removeEventListener('resize', resizeTerm)
window.removeEventListener('resize', resizeTerm)
EventsOff(`cmd:output:${props.name}`)
termInst.dispose()
termInst = null
Expand Down

0 comments on commit 5a29a34

Please sign in to comment.