feat: 添加历史命令功能

This commit is contained in:
Baobhan Sith
2025-04-17 12:06:09 +08:00
parent 9f6c466fd9
commit b62982faa0
15 changed files with 961 additions and 20 deletions
+5 -4
View File
@@ -1,19 +1,20 @@
import { defineStore } from 'pinia';
import { ref } from 'vue';
// 定义面板名称的类型,方便管理和引用 (恢复 commandBar)
export type PaneName = 'connections' | 'terminal' | 'commandBar' | 'fileManager' | 'editor' | 'statusMonitor';
// 定义面板名称的类型,方便管理和引用 (添加 commandHistory)
export type PaneName = 'connections' | 'terminal' | 'commandBar' | 'fileManager' | 'editor' | 'statusMonitor' | 'commandHistory';
// 定义 Store
export const useLayoutStore = defineStore('layout', () => {
// 使用 ref 创建响应式状态,存储每个面板的可见性 (恢复 commandBar)
// 使用 ref 创建响应式状态,存储每个面板的可见性 (添加 commandHistory)
const paneVisibility = ref<Record<PaneName, boolean>>({
connections: true,
terminal: true,
commandBar: true, // 恢复
commandBar: true,
fileManager: true,
editor: true,
statusMonitor: true,
commandHistory: true, // 默认可见
});
// Action: 切换指定面板的可见性