Skip to content

Commit

Permalink
修复: 新窗口打开时,会出现上一个窗口的消息 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlindM committed Nov 5, 2022
1 parent 4923a3c commit b197fbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/views/shell/terminal/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="h-full shadow-sm rounded-16px" @contextmenu="disabledContextMenu" @mouseleave="hideDropdownMenu">
<div id="container" style="height: 95.7%">
<div id="terminal" class="h-full"></div>
<div :id="`terminal${channelId}`" class="h-full"></div>
<n-dropdown
ref="dropdownMenu"
:flip="false"
Expand Down Expand Up @@ -298,7 +298,7 @@ onMounted(() => {
const fontSize = 18;
term = new Terminal({
rendererType: 'canvas',
name: 'terminal'+channelId,
name: `terminal${channelId}`,
rightClickSelectsWord: true,
scrollback: 800,
disableStdin: false,
Expand Down Expand Up @@ -507,7 +507,7 @@ onMounted(() => {
window.console.info(`term 处理 该按键`);
return true;
});
term.open(document.getElementById('terminal'));
term.open(document.getElementById(`terminal${channelId}`));
fitAddon.fit();
initConnect().then(data => {
Expand Down

0 comments on commit b197fbe

Please sign in to comment.