refactor(types): 将类型定义移动到独立的types模块

将原本分散在多个文件中的TreeNode和Template类型定义集中到src/types模块中,并更新所有相关引用
修改tsconfig配置以包含新的types目录
优化IPCs中模板处理逻辑,改进文件复制和路径处理
This commit is contained in:
zhanggy committed 2025-10-31 17:20:09 +08:00
1 parent 35a0821153
commit e496aa59f4
10 files changed
+49 -44

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
// 定义树状结构的节点
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[]
}