This commit is contained in:
Baobhan Sith
2025-05-01 20:10:29 +08:00
parent 4196a2f51d
commit f4c05fe82a
4 changed files with 40 additions and 6 deletions
@@ -399,9 +399,14 @@ const clearSearch = () => {
searchAddon?.clearDecorations();
};
defineExpose({ write, findNext, findPrevious, clearSearch });
// +++ 添加 clear 方法 +++
const clear = () => {
terminal?.clear();
};
defineExpose({ write, findNext, findPrevious, clearSearch, clear }); // 暴露 clear 方法
// --- 应用终端背景 ---
const applyTerminalBackground = () => {
if (terminalRef.value) {