Javascript Xtermjs不渲染大型输出
我正在使用pusher和xtermjs。对于像Javascript Xtermjs不渲染大型输出,javascript,terminal,xtermjs,Javascript,Terminal,Xtermjs,我正在使用pusher和xtermjs。对于像w或free-m这样的命令的小输出,它可以正常工作。对于命令的大输出ps-aux它不起作用。输出显示在浏览器控制台中,但不显示在xtermjs output div中 这是我的pusher事件处理程序 this.term = new Terminal({ debug: true, allowTransparency: true, applicationCursor: true, applicat
w
或free-m
这样的命令的小输出,它可以正常工作。对于命令的大输出ps-aux
它不起作用。输出显示在浏览器控制台中,但不显示在xtermjs output div中
这是我的pusher事件处理程序
this.term = new Terminal({
debug: true,
allowTransparency: true,
applicationCursor: true,
applicationKeypad: true,
normalFontWeight: 100,
fontSize: 14,
cursorBlink: true,
cursorStyle: 'block', // “block” | “underline” | “bar” *
})
this.term.open(document.getElementById(this.outputDiv))
this.term.fit()
let screenObject = this
let terminalObj = this.term
window.UserChannel.bind('com.testing.command.result', function (data) {
// console.log(data)
let text = data.payload.replace(/\n/g, '\r\n')
terminalObj.writeln(text)
// terminalObj.fit()
// screenObject.hideHelpers()
})
问题在于xterm滚动区域。它在背后隐藏数据。我已经将样式选项设置为
position:absolute;z指数:0代码>成功了