// 定义树状结构的节点 export interface TreeNode { id: string name: string path: string // 完整路径 type: 'directory' | 'file' children?: TreeNode[] sourcePath?: string sourceType?: 'file' | 'folder' // 记录选择的是文件还是文件夹 } export interface Template { id: string name: string description: string // 使用树状结构存储 treeStructure: TreeNode[] }