fix: xterminal run error

This commit is contained in:
engigu
2026-01-14 19:25:26 +08:00
parent 57025e1eb4
commit 10e79ef1cf
2 changed files with 23 additions and 8 deletions
+8 -3
View File
@@ -195,14 +195,19 @@ async function runScript() {
}
showTerminalDialog.value = true
// 等待 DOM 更新后初始化终端
// 等待 DOM 更新后初始化终端,增加延迟确保 Dialog 完全渲染
await nextTick()
terminalRef.value?.initTerminal(true)
setTimeout(() => {
terminalRef.value?.initTerminal(true)
}, 100)
}
function closeTerminal() {
showTerminalDialog.value = false
terminalRef.value?.dispose()
// 延迟清理,确保 Dialog 关闭动画完成
setTimeout(() => {
terminalRef.value?.dispose()
}, 300)
}
async function handleMove(oldPath: string, newPath: string) {