feat: 添加历史命令功能
This commit is contained in:
@@ -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: 切换指定面板的可见性
|
||||
|
||||
Reference in New Issue
Block a user