fix: add cli fit the window when resize
This commit is contained in:
parent
ca8403d784
commit
5a29a34ea1
|
@ -58,7 +58,7 @@ onMounted(() => {
|
||||||
const { term, fitAddon } = newTerm()
|
const { term, fitAddon } = newTerm()
|
||||||
termInst = term
|
termInst = term
|
||||||
fitAddonInst = fitAddon
|
fitAddonInst = fitAddon
|
||||||
// window.addEventListener('resize', resizeTerm)
|
window.addEventListener('resize', resizeTerm)
|
||||||
|
|
||||||
term.writeln('\r\n' + i18nGlobal.t('interface.cli_welcome'))
|
term.writeln('\r\n' + i18nGlobal.t('interface.cli_welcome'))
|
||||||
// term.write('\x1b[4h') // insert mode
|
// term.write('\x1b[4h') // insert mode
|
||||||
|
@ -71,7 +71,7 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// window.removeEventListener('resize', resizeTerm)
|
window.removeEventListener('resize', resizeTerm)
|
||||||
EventsOff(`cmd:output:${props.name}`)
|
EventsOff(`cmd:output:${props.name}`)
|
||||||
termInst.dispose()
|
termInst.dispose()
|
||||||
termInst = null
|
termInst = null
|
||||||
|
|
Loading…
Reference in New Issue