Skip to content

xterm 渲染不全 #4992

@enjoy-myLife

Description

@enjoy-myLife

Details

  • Browser and browser version: Chrome 120.0.6099.225
  • OS version:
  • xterm.js version: 5.3.0

Steps to reproduce

  1. 附件文本
  2. rows为很小的数字比如5

const initTerm = () => {
term.value = new Terminal({
cols:102,
rows:5,
fontSize: 14,
fontFamily: "Monaco, Menlo, Consolas, 'Courier New', monospace",
});
term.value.open(terminal.value); //挂载dom窗口
// term.value.loadAddon(fitAddon); //自适应尺寸
// 不能初始化的时候fit,需要等terminal准备就绪,可以设置延时操作

term.value.onRender(() => {
	// fitAddon.fit();
});
termData(); //Terminal 事件挂载

};

// 终端输入触发事件
const termData = () => {
// 输入与粘贴的情况,onData不能重复绑定,不然会发送多次
term.value.onData((data: string) => {
emits('onData', data);
});
};

onMounted(() => {
initTerm();
setTimeout(()=>{
term.value.write(附件文本)
},5000)
});

xterm不能将文本渲染完全,在开发者工具里面甚至很多文本没有渲染

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions